PHP 클래스 AdWordsUser, googleads-php-lib

상속: extends AdsUser
파일 보기 프로젝트 열기: googleads/googleads-php-lib 1 사용 예제들

공개 메소드들

메소드 설명
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.

보호된 메소드들

메소드 설명
InitLogs ( ) Overrides AdsUser::InitLogs(), adding an additional log for report download requests.

메소드 상세

GetClientCustomerId() 공개 메소드

Gets the client customer ID for this user.
public GetClientCustomerId ( ) : string
리턴 string the client customer ID for this user

GetClientLibraryNameAndVersion() 공개 메소드

또한 보기: AdsUser::GetClientLibraryNameAndVersion()

GetDefaultOAuth2Handler() 공개 메소드

Get the default OAuth2 Handler for this user.
public GetDefaultOAuth2Handler ( null | string $className = null ) : mixed
$className null | string the name of the oauth2Handler class or null
리턴 mixed the configured OAuth2Handler class

GetDeveloperToken() 공개 메소드

Gets the developer token for this user.
public GetDeveloperToken ( ) : string
리턴 string the developer token

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() 공개 메소드

Gets OAuth2 scopes.
public GetScopes ( ) : array
리턴 array the list of OAuth2 scopes

GetService() 공개 메소드

Gets the service by its service name and group.
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
리턴 SoapClient the instantiated service

GetUserAgent() 공개 메소드

Gets the raw user agent for this user.
public GetUserAgent ( ) : string
리턴 string The raw user agent.

GetUserAgentHeaderName() 공개 메소드

또한 보기: AdsUser::GetUserAgentHeaderName()

InitLogs() 보호된 메소드

Overrides AdsUser::InitLogs(), adding an additional log for report download requests.
protected InitLogs ( )

LoadService() 공개 메소드

Loads the classes within a service, so they can be used before the service is constructed.
public LoadService ( string $serviceName, string | null $version = null )
$serviceName string the service name
$version string | null the version of the service to get. If null, then the default version will be used

LogAll() 공개 메소드

Overrides AdsUser::LogAll(), setting an additional log level for report download requests.
public LogAll ( )

LogDefaults() 공개 메소드

Overrides AdsUser::LogDefaults(), setting an additional log level for report download requests.
public LogDefaults ( )

LogErrors() 공개 메소드

Overrides AdsUser::LogErrors(), setting an additional log level for report download requests.
public LogErrors ( )

SetClientCustomerId() 공개 메소드

Sets the client customer ID for this user.
public SetClientCustomerId ( string $clientCustomerId )
$clientCustomerId string the client customer ID for this user

SetDeveloperToken() 공개 메소드

Sets the developer token for this user.
public SetDeveloperToken ( string $developerToken )
$developerToken string the developer token

SetExpressBusinessId() 공개 메소드

Sets the AdWords Express business ID required for AdWords Express PromotionService
public SetExpressBusinessId ( $businessId )

SetExpressPlusPageId() 공개 메소드

Sets the Google My Business page ID used by AdWords Express PromotionService
public SetExpressPlusPageId ( $pageId )

SetScopes() 공개 메소드

Sets OAuth2 scopes.
public SetScopes ( $scopes )

SetUserAgent() 공개 메소드

Sets the raw user agent for this user.
public SetUserAgent ( string $userAgent )
$userAgent string The raw user agent.

ValidateUser() 공개 메소드

Validates the user and throws a validation error if there are any errors.
public ValidateUser ( )

__call() 공개 메소드

Handles calls to undefined methods.
public __call ( string $name, array $arguments ) : mixed
$name string the name of the method being called
$arguments array the arguments passed to the method
리턴 mixed the result of the correct method call, or nothing if there is no correct method

__construct() 공개 메소드

The AdWordsUser class can be configured in one of two ways:

  1. Using an authenitcation INI file
  2. Using supplied credentials

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