Method | Description | |
---|---|---|
GetClientLibraryUserAgent ( ) : string | Gets the user agent string that identifies this library for this user. | |
GetDefaultOAuth2Handler ( null | string $className = null ) : mixed | Get the default OAuth2 Handler for this user. | |
GetDefaultServer ( ) : string | Gets the default server. | |
GetDefaultVersion ( ) : string | Gets the default version. | |
GetForceAddXsiTypes ( ) : boolean | Gets the setting of whether or not to add XSI types in the SOAP payload. | |
GetForceHttpVersion ( ) : float | Gets the version of the HTTP protocol to use regardless of PHP version. | |
GetHeaderNames ( ) : array | Gets the names of all registered request header elements. | |
GetHeaderValue ( string $key ) : string | Gets the value for a registered request header element. | |
GetLogsDirectory ( ) : string | Gets the logs directory. | |
GetOAuth2Handler ( ) : OAuth2Handler | Gets the OAuth2 handler for this user. | |
GetOAuth2Info ( ) : array | Gets the OAuth2 info for this user. | |
GetServiceSoapClient ( string $serviceName, SoapClientFactory $serviceFactory ) : SoapClient | Gets the service by its service name. | |
GetSoapCompressionLevel ( ) : integer | Gets the SOAP compression level. | |
GetWsdlCacheType ( ) : integer | Gets the type of WSDL caching in use. | |
IsSoapCompressionEnabled ( ) : boolean | Is SOAP compression enabled. | |
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. | |
LogAll ( ) | Configures the library to log all requests. | |
LogDefaults ( ) | Configures the library to log basic information about all requests and the full SOAP XML request and response only when an error occurs. | |
LogErrors ( ) | Configures the library to only log requests that return an error. | |
SetDefaultServer ( string $defaultServer ) | Sets the default server. | |
SetDefaultVersion ( string $defaultVersion ) | Sets the default version. | |
SetHeaderValue ( string $key, string $value ) | Sets the value for a request header. | |
SetOAuth2Handler ( array $oauth2Handler ) | Sets the OAuth2 handler for this user. | |
SetOAuth2Info ( array $oauth2Info ) | Sets the OAuth2 info for this user. | |
getIsIncludeUtilitiesInUserAgent ( ) : boolean | ||
setIncludeUtilitiesInUserAgent ( boolean $isIncludeUtilitiesInUserAgent ) | ||
updateClientLibraryUserAgent ( string $applicationName ) | Sets the user agent string that identifies this library for this user. |
Method | Description | |
---|---|---|
GetAuthVarValue ( string | null $authVar, string $authVarName, array $authIni ) : string | Gets the authenticaiton value for the $authVar supplied. If the $authVar is set, it is is used. Otherwise, the supplied $authenticationIni is queried for the variable. If none is found null is returned. | |
GetClientLibraryNameAndVersion ( ) : array | Gets the name and version of this client library. | |
GetUserAgentHeaderName ( ) : string | Gets the appropriate user agent header name for the API this client library is targeting. | |
InitLogs ( ) | Initializes the logging mechanism used by services created by this user. | |
ValidateOAuth2Info ( ) | Validates that the OAuth2 info is complete. | |
__construct ( ) | Constructor for AdsUser. |
Method | Description | |
---|---|---|
Define ( string $name, string $value ) | Define a constant if it isn't already defined. If it is defined but the value is different then attempt to redefine it, which will fail and throw the appropriate error. | |
GetAllClientLibraryUserAgentParts ( ) : array | Gets all the user agent parts that identify this client library plus user agent parts from the ads utilities registry. | |
GetCommonClientLibraryUserAgentParts ( ) : array | Gets common PHP user agent parts for ads client libraries such as PHP version, operating system, browser, or if compression is being used or not. | |
GetSetting ( array $settings, string $section, string $name, mixed $default = null ) : string | Gets the value for a given setting based on the contents of the parsed INI file. |
protected GetAuthVarValue ( string | null $authVar, string $authVarName, array $authIni ) : string | ||
$authVar | string | null | the default value for the authentication variable |
$authVarName | string | the name of the authentication variable |
$authIni | array | the array of authentication variables from an INI file |
return | string | the authentication variable value |
abstract protected GetClientLibraryNameAndVersion ( ) : array | ||
return | array | An array containing the name and version of this client library, e.g.: ['DfpApi-PHP', '2.13.0']. |
public GetClientLibraryUserAgent ( ) : string | ||
return | string | A user agent string. |
public GetDefaultServer ( ) : string | ||
return | string | the default server |
public GetDefaultVersion ( ) : string | ||
return | string | the default version |
public GetForceAddXsiTypes ( ) : boolean | ||
return | boolean | whether or not to add XSI types in the SOAP payload |
public GetForceHttpVersion ( ) : float | ||
return | float | the HTTP version that should be used |
public GetHeaderNames ( ) : array | ||
return | array | the names of the request header elements |
public GetHeaderValue ( string $key ) : string | ||
$key | string | the name of the request header element |
return | string | the value of the request header element or null if not found |
public GetLogsDirectory ( ) : string | ||
return | string | the logs directory |
public GetOAuth2Handler ( ) : OAuth2Handler | ||
return | OAuth2Handler | the OAuth2 handler for this user |
public GetOAuth2Info ( ) : array | ||
return | array | the OAuth2 info for this user |
public GetServiceSoapClient ( string $serviceName, SoapClientFactory $serviceFactory ) : SoapClient | ||
$serviceName | string | the service name |
$serviceFactory | SoapClientFactory | the service factory |
return | SoapClient | the instantiated service |
public GetSoapCompressionLevel ( ) : integer | ||
return | integer | the SOAP compression level |
abstract protected GetUserAgentHeaderName ( ) : string | ||
return | string | The user agent header name. |
public GetWsdlCacheType ( ) : integer | ||
return | integer | the type of WSDL caching in use |
protected InitLogs ( ) |
public IsSoapCompressionEnabled ( ) : boolean | ||
return | boolean | is SOAP compression enabled |
public LoadSettings ( string $settingsIniPath, string $defaultVersion, string $defaultServer, string $defaultLogsDir, string $logsRelativePathBase ) | ||
$settingsIniPath | string | the path to the settings INI file |
$defaultVersion | string | the default version if the settings INI file cannot be loaded |
$defaultServer | string | the default server if the settings INI file cannot be loaded |
$defaultLogsDir | string | the default logs directory if the settings INI file cannot be loaded |
$logsRelativePathBase | string | the relative path base for the logs directory |
public LogDefaults ( ) |
public LogErrors ( ) |
public SetDefaultServer ( string $defaultServer ) | ||
$defaultServer | string | the default server |
public SetDefaultVersion ( string $defaultVersion ) | ||
$defaultVersion | string | the default version |
public SetHeaderValue ( string $key, string $value ) | ||
$key | string | the name of the request header element |
$value | string | the value for the request header element |
public SetOAuth2Handler ( array $oauth2Handler ) | ||
$oauth2Handler | array | the OAuth2 handler for this user |
public SetOAuth2Info ( array $oauth2Info ) | ||
$oauth2Info | array | the OAuth2 info for this user |
protected ValidateOAuth2Info ( ) |
public getIsIncludeUtilitiesInUserAgent ( ) : boolean | ||
return | boolean | whether or not names of ads utilities being used will be included in the user agent |
public setIncludeUtilitiesInUserAgent ( boolean $isIncludeUtilitiesInUserAgent ) | ||
$isIncludeUtilitiesInUserAgent | boolean | whether ads utilities being used will be included in the user agent |
public updateClientLibraryUserAgent ( string $applicationName ) | ||
$applicationName | string | The application name that will appear in this header |