Méthode | Description | |
---|---|---|
GetClientCustomerId ( ) : string | Gets the client customer ID for this user. | |
GetClientLibraryNameAndVersion ( ) | ||
GetDefaultOAuth2Handler ( null | string $className = null ) : mixed | Get the default OAuth2 Handler for this user. | |
GetDeveloperToken ( ) : string | Gets the developer token for this user. | |
GetExpressBusinessId ( ) | Gets the AdWords Express business ID required for AdWords Express PromotionService | |
GetExpressPlusPageId ( ) | Gets the Google My Business page ID used by AdWords Express PromotionService | |
GetScopes ( ) : array | Gets OAuth2 scopes. | |
GetService ( string $serviceName, string | null $version = null, string | null $server = null, SoapClientFactory $serviceFactory = null, boolean | null $validateOnly = null, boolean | null $partialFailure = null ) : SoapClient | Gets the service by its service name and group. | |
GetUserAgent ( ) : string | Gets the raw user agent for this user. | |
GetUserAgentHeaderName ( ) | ||
LoadService ( string $serviceName, string | null $version = null ) | Loads the classes within a service, so they can be used before the service is constructed. | |
LogAll ( ) | Overrides AdsUser::LogAll(), setting an additional log level for report download requests. | |
LogDefaults ( ) | Overrides AdsUser::LogDefaults(), setting an additional log level for report download requests. | |
LogErrors ( ) | Overrides AdsUser::LogErrors(), setting an additional log level for report download requests. | |
SetClientCustomerId ( string $clientCustomerId ) | Sets the client customer ID for this user. | |
SetDeveloperToken ( string $developerToken ) | Sets the developer token for this user. | |
SetExpressBusinessId ( $businessId ) | Sets the AdWords Express business ID required for AdWords Express PromotionService | |
SetExpressPlusPageId ( $pageId ) | Sets the Google My Business page ID used by AdWords Express PromotionService | |
SetScopes ( $scopes ) | Sets OAuth2 scopes. | |
SetUserAgent ( string $userAgent ) | Sets the raw user agent for this user. | |
ValidateUser ( ) | Validates the user and throws a validation error if there are any errors. | |
__call ( string $name, array $arguments ) : mixed | Handles calls to undefined methods. | |
__construct ( string | null $authenticationIniPath = null, string | null $developerToken = null, string | null $userAgent = null, string | null $clientCustomerId = null, string | null $settingsIniPath = null, array | null $oauth2Info = null ) | The AdWordsUser constructor. |
Méthode | Description | |
---|---|---|
InitLogs ( ) | Overrides AdsUser::InitLogs(), adding an additional log for report download requests. |
public GetClientCustomerId ( ) : string | ||
Résultat | string | the client customer ID for this user |
public GetDeveloperToken ( ) : string | ||
Résultat | string | the developer token |
public GetExpressBusinessId ( ) |
public GetExpressPlusPageId ( ) |
public GetService ( string $serviceName, string | null $version = null, string | null $server = null, SoapClientFactory $serviceFactory = null, boolean | null $validateOnly = null, boolean | null $partialFailure = null ) : SoapClient | ||
$serviceName | string | the service name |
$version | string | null | the version of the service to get. If null, then the default version will be used |
$server | string | null | the server to make the request to. If null, then the default server will be used |
$serviceFactory | SoapClientFactory | the factory to create the client. If null, then the built-in SOAP client factory will be used |
$validateOnly | boolean | null | if the service should be created in validateOnly mode |
$partialFailure | boolean | null | if the service should be created in partialFailure mode |
Résultat | SoapClient | the instantiated service |
public GetUserAgent ( ) : string | ||
Résultat | string | The raw user agent. |
protected InitLogs ( ) |
public LogAll ( ) |
public LogDefaults ( ) |
public LogErrors ( ) |
public SetClientCustomerId ( string $clientCustomerId ) | ||
$clientCustomerId | string | the client customer ID for this user |
public SetDeveloperToken ( string $developerToken ) | ||
$developerToken | string | the developer token |
public SetExpressBusinessId ( $businessId ) |
public SetExpressPlusPageId ( $pageId ) |
public SetUserAgent ( string $userAgent ) | ||
$userAgent | string | The raw user agent. |
public ValidateUser ( ) |
The AdWordsUser class can be configured in one of two ways:
If an authentication INI file is provided and successfully loaded, those values will be used unless a corresponding parameter overwrites it. If the authentication INI file is not provided (e.g. it is null) the class will attempt to load the default authentication file at the path of "../auth.ini" relative to this file's directory. Any corresponding parameter, which is not null, will, however, overwrite any parameter loaded from the default INI.
Likewise, if a custom settings INI file is not provided, the default settings INI file will be loaded from the path of "../settings.ini" relative to this file's directory.
public __construct ( string | null $authenticationIniPath = null, string | null $developerToken = null, string | null $userAgent = null, string | null $clientCustomerId = null, string | null $settingsIniPath = null, array | null $oauth2Info = null ) | ||
$authenticationIniPath | string | null | the absolute path to the authentication INI or relative to the current directory (cwd). If null, the default authentication INI file will attempt to be loaded |
$developerToken | string | null | the developer token (required header). Will overwrite the developer token entry loaded from any INI file |
$userAgent | string | null | the user agent name (required header). Will be prepended with the library name and version. Will overwrite the userAgent entry loaded from any INI file |
$clientCustomerId | string | null | the client customer ID to make the request against (optional header). Will overwrite the clientCustomerId entry loaded from any INI file |
$settingsIniPath | string | null | the path to the settings INI file. If null, the default settings INI file will be loaded |
$oauth2Info | array | null | the OAuth 2.0 information to use for requests |