Method | Description | |
---|---|---|
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. |
public GetApplicationName ( ) : string | ||
return | string | The raw application name. |
public GetNetworkCode ( ) : string | ||
return | string | the network code |
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 |
return | SoapClient | the instantiated service |
public SetApplicationName ( string $applicationName ) | ||
$applicationName | string | The raw application name. |
public SetNetworkCode ( string $networkCode ) | ||
$networkCode | string | the network code |
public ValidateUser ( ) |
The DfpUser 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 $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 |