ClientBuilder
in package
Builder for creating AWS service clients
Table of Contents
Properties
- $clientNamespace : string
- $commonConfigDefaults : array<string|int, mixed>
- $commonConfigRequirements : array<string|int, mixed>
- $config : array<string|int, mixed>
- $configDefaults : array<string|int, mixed>
- $configRequirements : array<string|int, mixed>
- $exceptionParser : ExceptionParserInterface
- $iteratorsConfig : array<string|int, mixed>
- $clientClass : string
- $serviceName : string
Methods
- __construct() : mixed
- Constructs a client builder
- build() : AwsClientInterface
- Performs the building logic using all of the parameters that have been set and falling back to default values. Returns an instantiate service client with credentials prepared and plugins attached.
- factory() : ClientBuilder
- Factory method for creating the client builder
- setConfig() : ClientBuilder
- Sets the config options
- setConfigDefaults() : ClientBuilder
- Sets the config options' defaults
- setConfigRequirements() : ClientBuilder
- Sets the required config options
- setExceptionParser() : ClientBuilder
- Sets the exception parser. If one is not provided the builder will use the default XML exception parser.
- setIteratorsConfig() : ClientBuilder
- Set the configuration for the client's iterators
- addBackoffLogger() : mixed
- Add backoff logging to the backoff plugin if needed
- getCredentials() : mixed
- getSignature() : SignatureInterface
- Return an appropriate signature object for a a client based on the "signature" configuration setting, or the default signature specified in a service description. The signature can be set to a valid signature version identifier string or an instance of Aws\Common\Signature\SignatureInterface.
- processArray() : array<string|int, mixed>
- Ensures that an array (e.g. for config data) is actually in array form
- updateConfigFromDescription() : ServiceDescription
- Update a configuration object from a service description
- createDefaultBackoff() : mixed
- extractHttpConfig() : mixed
- handleEndpoint() : mixed
- handleRegion() : mixed
Properties
$clientNamespace
protected
string
$clientNamespace
The namespace of the client
$commonConfigDefaults
protected
static array<string|int, mixed>
$commonConfigDefaults
= array('scheme' => 'https')
Default client config
$commonConfigRequirements
protected
static array<string|int, mixed>
$commonConfigRequirements
= array(\Aws\Common\Enum\ClientOptions::SERVICE_DESCRIPTION)
Default client requirements
$config
protected
array<string|int, mixed>
$config
= array()
The config options
$configDefaults
protected
array<string|int, mixed>
$configDefaults
= array()
The config defaults
$configRequirements
protected
array<string|int, mixed>
$configRequirements
= array()
The config requirements
$exceptionParser
protected
ExceptionParserInterface
$exceptionParser
The Parser interface for the client
$iteratorsConfig
protected
array<string|int, mixed>
$iteratorsConfig
= array()
Array of configuration data for iterators available for the client
$clientClass
private
string
$clientClass
$serviceName
private
string
$serviceName
Methods
__construct()
Constructs a client builder
public
__construct([string $namespace = null ]) : mixed
Parameters
- $namespace : string = null
-
The namespace of the client
build()
Performs the building logic using all of the parameters that have been set and falling back to default values. Returns an instantiate service client with credentials prepared and plugins attached.
public
build() : AwsClientInterface
Tags
Return values
AwsClientInterfacefactory()
Factory method for creating the client builder
public
static factory([string $namespace = null ]) : ClientBuilder
Parameters
- $namespace : string = null
-
The namespace of the client
Return values
ClientBuildersetConfig()
Sets the config options
public
setConfig(array<string|int, mixed>|Collection $config) : ClientBuilder
Parameters
- $config : array<string|int, mixed>|Collection
-
The config options
Return values
ClientBuildersetConfigDefaults()
Sets the config options' defaults
public
setConfigDefaults(array<string|int, mixed>|Collection $defaults) : ClientBuilder
Parameters
- $defaults : array<string|int, mixed>|Collection
-
The default values
Return values
ClientBuildersetConfigRequirements()
Sets the required config options
public
setConfigRequirements(array<string|int, mixed>|Collection $required) : ClientBuilder
Parameters
- $required : array<string|int, mixed>|Collection
-
The required config options
Return values
ClientBuildersetExceptionParser()
Sets the exception parser. If one is not provided the builder will use the default XML exception parser.
public
setExceptionParser(ExceptionParserInterface $parser) : ClientBuilder
Parameters
- $parser : ExceptionParserInterface
-
The exception parser
Return values
ClientBuildersetIteratorsConfig()
Set the configuration for the client's iterators
public
setIteratorsConfig(array<string|int, mixed> $config) : ClientBuilder
Parameters
- $config : array<string|int, mixed>
-
Configuration data for client's iterators
Return values
ClientBuilderaddBackoffLogger()
Add backoff logging to the backoff plugin if needed
protected
addBackoffLogger(BackoffPlugin $plugin, Collection $config) : mixed
Parameters
- $plugin : BackoffPlugin
-
Backoff plugin
- $config : Collection
-
Configuration settings
Tags
getCredentials()
protected
getCredentials(Collection $config) : mixed
Parameters
- $config : Collection
getSignature()
Return an appropriate signature object for a a client based on the "signature" configuration setting, or the default signature specified in a service description. The signature can be set to a valid signature version identifier string or an instance of Aws\Common\Signature\SignatureInterface.
protected
getSignature(ServiceDescription $description, Collection $config) : SignatureInterface
Parameters
- $description : ServiceDescription
-
Description that holds a signature option
- $config : Collection
-
Configuration options
Tags
Return values
SignatureInterfaceprocessArray()
Ensures that an array (e.g. for config data) is actually in array form
protected
processArray(array<string|int, mixed>|Collection $array) : array<string|int, mixed>
Parameters
- $array : array<string|int, mixed>|Collection
-
The array data
Tags
Return values
array<string|int, mixed>updateConfigFromDescription()
Update a configuration object from a service description
protected
updateConfigFromDescription(Collection $config) : ServiceDescription
Parameters
- $config : Collection
-
Config to update
Tags
Return values
ServiceDescriptioncreateDefaultBackoff()
private
createDefaultBackoff() : mixed
extractHttpConfig()
private
extractHttpConfig(Collection $config) : mixed
Parameters
- $config : Collection
handleEndpoint()
private
handleEndpoint(Collection $config) : mixed
Parameters
- $config : Collection
handleRegion()
private
handleRegion(Collection $config) : mixed
Parameters
- $config : Collection