Namespace for PHP Client Library

142 views
Skip to first unread message

Kristopher Windsor

unread,
Nov 24, 2014, 6:05:11 PM11/24/14
to adwor...@googlegroups.com
Hi,

The Adwords API PHP client library defines, among other things, a class named "Logger" in the global namespace that will conflict with another Logger class we want to use.
Is there an easy way to put all of the client library code into a namespace to avoid the class name collision?

In AdsUser.php:
require_once 'Google/Api/Ads/Common/Util/Logger.php';


/**
 * A logger class which registers appenders (any writable handle location
 * which can be fopen'ed) with a unique name for that log. The library will
 * write all incoming/outgoing SOAP XML to <var>SOAP_XML_LOG</var> and
 * all records of requests to <var>REQUEST_INFO_LOG</var>.
 *
 * Currently, levels are only used as indicators (there is no filtering
 * mechanism as of yet).
 *
 * A list of supported appenders (file handles) can be found here:
 * {@link http://us2.php.net/manual/en/wrappers.php}
 *
 * @package GoogleApiAdsCommon
 * @subpackage Util
 */

class Logger {



Thanks,

Danial Klimkin

unread,
Nov 25, 2014, 7:48:40 AM11/25/14
to adwor...@googlegroups.com
Hello Kristopher,


This is currently work in progress, see the experimental branch:



-Danial, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages