PHP 클래스 DfpUser, googleads-php-lib

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

공개 메소드들

메소드 설명
GetApplicationName ( ) : string Gets the raw application name for this user.
GetClientLibraryNameAndVersion ( )
GetDefaultOAuth2Handler ( null | string $className = null ) : mixed Get the default OAuth2 Handler for this user.
GetNetworkCode ( ) : string Gets the code for the network that this user belongs to.
GetScopes ( ) : array Gets OAuth2 scopes.
GetService ( string $serviceName, string $version = null, string $server = null, SoapClientFactory $serviceFactory = null ) : SoapClient Gets the service by its service name.
GetUserAgentHeaderName ( )
SetApplicationName ( string $applicationName ) Sets the raw application name for this user.
SetNetworkCode ( string $networkCode ) Sets the code for the network that this user belongs to.
SetScopes ( $scopes ) Sets OAuth2 scopes.
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 $authenticationIniPath = null, string $applicationName = null, string $networkCode = null, string $settingsIniPath = null, array $oauth2Info = null ) The DfpUser constructor.

메소드 상세

GetApplicationName() 공개 메소드

Gets the raw application name for this user.
public GetApplicationName ( ) : string
리턴 string The raw application name.

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

GetNetworkCode() 공개 메소드

Gets the code for the network that this user belongs to.
public GetNetworkCode ( ) : string
리턴 string the network code

GetScopes() 공개 메소드

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

GetService() 공개 메소드

Gets the service by its service name.
public GetService ( string $serviceName, string $version = null, string $server = null, SoapClientFactory $serviceFactory = null ) : SoapClient
$serviceName string the service name
$version string the version of the service to get. If null, then the default version will be used
$server string 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
리턴 SoapClient the instantiated service

GetUserAgentHeaderName() 공개 메소드

또한 보기: AdsUser::GetUserAgentHeaderName()

SetApplicationName() 공개 메소드

Sets the raw application name for this user.
public SetApplicationName ( string $applicationName )
$applicationName string The raw application name.

SetNetworkCode() 공개 메소드

Sets the code for the network that this user belongs to.
public SetNetworkCode ( string $networkCode )
$networkCode string the network code

SetScopes() 공개 메소드

Sets OAuth2 scopes.
public SetScopes ( $scopes )

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 DfpUser class can be configured in one of two ways:

  1. Using an authentication 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 $authenticationIniPath = null, string $applicationName = null, string $networkCode = null, string $settingsIniPath = null, array $oauth2Info = null )
$authenticationIniPath string 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
$applicationName string the application name (required header). Will be prepended with the library name and version. Will also overwrite the applicationName entry in any INI file
$networkCode string the network code the user belongs to (optional header). Can be left null if the user only belongs to one network. Will overwrite the networkCode entry in any INI file
$settingsIniPath string the path to the settings INI file. If null, the default settings INI file will be loaded
$oauth2Info array the OAuth 2.0 information to use for requests