GoogleApiAdsCommon
[ class tree: GoogleApiAdsCommon ] [ index: GoogleApiAdsCommon ] [ all elements ]

Class: AdsUser

Source Location: /Common/Lib/AdsUser.php

Class Overview


User class for all API modules using the Ads API.


Author(s):

Methods


Child classes:

AdWordsUser
User class for the AdWords API to create SOAP clients to the available API services.

Class Details

[line 39]
User class for all API modules using the Ads API.



Tags:

abstract:  


[ Top ]


Class Methods


constructor __construct [line 54]

AdsUser __construct( )

Constructor for AdsUser.



Tags:

access:  protected


Overridden in child classes as:

AdWordsUser::__construct()
The AdWordsUser constructor.

[ Top ]

method GetAuthServer [line 346]

string GetAuthServer( )

Gets the server used for authentication.



Tags:

return:  the server used for authentiation
access:  public


[ Top ]

method GetAuthVarValue [line 72]

string GetAuthVarValue( string $authVar, string $authVarName, $authIni)

Gets the authenticaiton value for the $authVar supplied. If the $authVar is set, it is is used. Otherwirse, the supplied $authenticationIni is queired for the variable. If none is found NULL is returned.



Tags:

return:  the authentication variable value
access:  protected


Parameters:

string   $authVar   the default value for the authenticaiton variable
string   $authVarName   the name of the authencation variable
array   $authIni   the array of authentication variables from an INI file

[ Top ]

method GetClientLibraryIdentifier [line 370]

string GetClientLibraryIdentifier( )

Gets the client library identifier used for user-agent fields.



Tags:

return:  a unique client library identifier
abstract:  
access:  public


Overridden in child classes as:

AdWordsUser::GetClientLibraryIdentifier()
Gets the client library identifier used for user-agent fields.

[ Top ]

method GetDefaultServer [line 282]

string GetDefaultServer( )

Gets the default server.



Tags:

return:  the default server
access:  public


[ Top ]

method GetDefaultVersion [line 298]

string GetDefaultVersion( )

Gets the default version.



Tags:

return:  the default version
access:  public


[ Top ]

method GetHeaderNames [line 89]

array GetHeaderNames( )

Gets the names of all registered request header elements.



Tags:

return:  the names of the request header elements
access:  public


[ Top ]

method GetHeaderValue [line 98]

string GetHeaderValue( string $key)

Gets the value for a registered request header element.



Tags:

return:  the value of the request header element or NULL if not found
access:  public


Parameters:

string   $key   the name of the request header element

[ Top ]

method GetLogsDirectory [line 314]

string GetLogsDirectory( )

Gets the logs directory.



Tags:

return:  the logs directory
access:  public


[ Top ]

method GetOAuthAuthorizationUrl [line 388]

string GetOAuthAuthorizationUrl( )

Gets the OAuth authorization URL for the OAuth token.



Tags:

return:  the URL used to authorize the token
access:  public


[ Top ]

method GetOAuthInfo [line 354]

array GetOAuthInfo( )

Gets the OAuth info for this user.



Tags:

return:  the OAuth info for this user
access:  public


[ Top ]

method GetOAuthScope [line 432]

string GetOAuthScope( [string $server = NULL])

Gets the OAuth scope for this user.



Tags:

return:  the scope to use when requesting an OAuth token
abstract:  
access:  protected


Overridden in child classes as:

AdWordsUser::GetOAuthScope()
Gets the OAuth scope for this user.

Parameters:

string   $server   the AdWords API server that requests will be made to

[ Top ]

method GetServiceSoapClient [line 127]

SoapClient GetServiceSoapClient( string $serviceName, SoapClientFactory $serviceFactory, [string $serviceGroup = NULL], [string $serviceGroupUrlOverride = NULL], [string $serviceGroupHeaderNamespaceOverride = NULL])

Gets the service by its service name.



Tags:

return:  the instantiated service
access:  public


Parameters:

string   $serviceName   the service name
SoapClientFactory   $serviceFactory   the service factory
string   $serviceGroup   the service group. Can be NULL if the product has not implemented service groups yet
string   $serviceGroupUrlOverride   the name of the service group to be used in the location url
string   $serviceGroupHeaderNamespaceOverride   the name of the service group to use in the header namespace

[ Top ]

method GetSoapCompressionLevel [line 330]

int GetSoapCompressionLevel( )

Gets the SOAP compression level.



Tags:

return:  the SOAP compression level
access:  public


[ Top ]

method GetWsdlCacheType [line 338]

int GetWsdlCacheType( )

Gets the type of WSDL caching in use.



Tags:

return:  the type of WSDL caching in use
access:  public


[ Top ]

method IsSoapCompressionEnabled [line 322]

bool IsSoapCompressionEnabled( )

Is SOAP compression enabled.



Tags:

return:  is SOAP compression enabled
access:  public


[ Top ]

method LoadSettings [line 161]

void LoadSettings( string $settingsIniPath, string $defaultVersion, string $defaultServer, string $defaultLogsDir, string $logsRelativePathBase)

Loads the settings for this client library. If the settings INI file located at $settingsIniPath cannot be loaded, then the parameters passed into this method are used.



Tags:

access:  public


Parameters:

string   $settingsIniPath   the path to the settings INI file
string   $defaultVersion   the default version if the settings INI file cannot be loaded
string   $defaultServer   the default server if the settings INI file cannot be loaded
string   $defaultLogsDir   the default logs directory if the settings INI file cannot be loaded
string   $logsRelativePathBase   the relative path base for the logs directory

[ Top ]

method LogDefaults [line 140]

void LogDefaults( )

Initiates the default logging behavior of logging all HTTP headers and SOAP XML to the soap_xml.log file and all request information to the request_info.log file under the logs directory.



Tags:

access:  public


[ Top ]

method RequestOAuthToken [line 377]

void RequestOAuthToken( [$callbackUrl $callbackUrl = NULL], [$server $server = NULL])

Requests a new OAuth token.



Tags:

access:  public


Parameters:

$callbackUrl   $callbackUrl   the URL to return to after the token is authorized
$server   $server   the AdWords API server that requests will be made to

[ Top ]

method SetDefaultServer [line 290]

void SetDefaultServer( string $defaultServer)

Sets the default server.



Tags:

access:  public


Parameters:

string   $defaultServer   the default server

[ Top ]

method SetDefaultVersion [line 306]

void SetDefaultVersion( string $defaultVersion)

Sets the default version.



Tags:

access:  public


Parameters:

string   $defaultVersion   the default version

[ Top ]

method SetHeaderValue [line 111]

void SetHeaderValue( string $key, string $value)

Sets the value for a request header.



Tags:

access:  public


Parameters:

string   $key   the name of the request header element
string   $value   the value for the request header element

[ Top ]

method SetOAuthInfo [line 362]

void SetOAuthInfo( array $oauthInfo)

Sets the OAuth info for this user.



Tags:

access:  public


Parameters:

array   $oauthInfo   the OAuth info for this user

[ Top ]

method UpgradeOAuthToken [line 398]

void UpgradeOAuthToken( string $verifier)

Upgrades the authorized OAuth token.



Tags:

access:  public


Parameters:

string   $verifier   the verifier string returned from authorizing the token

[ Top ]

method ValidateOAuthInfo [line 408]

void ValidateOAuthInfo( )

Validates that the OAuth info is complete.



Tags:

throws:  ValidationException if there are any validation errors
access:  protected


[ Top ]


Documentation generated by phpDocumentor 1.4.3