Class ClientBuilder
Builder for creating AWS service clients
Methods summary
-
public static
factory ( string $namespace = null )
Factory method for creating the client builder
-
public
__construct ( string $namespace = null )
Constructs a client builder
-
public
setConfig ( array|Collection $config )
Sets the config options
-
public
setConfigDefaults ( array|Collection $defaults )
Sets the config options' defaults
-
public
setConfigRequirements ( array|Collection $required )
Sets the required config options
-
public
setExceptionParser ( Aws\Common\Exception\Parser\ExceptionParserInterface $parser )
Sets the exception parser. If one is not provided the builder will use the default XML exception parser.
-
public
setIteratorsConfig ( array $config )
Set the configuration for the client's iterators
-
public
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.
-
protected
addBackoffLogger ( Guzzle\Plugin\Backoff\BackoffPlugin $plugin, Guzzle\Common\Collection $config )
Add backoff logging to the backoff plugin if needed
-
protected
processArray ( array|Collection $array )
Ensures that an array (e.g. for config data) is actually in array form
-
protected
updateConfigFromDescription ( Guzzle\Common\Collection $config )
Update a configuration object from a service description
-
protected
getSignature ( Guzzle\Service\Description\ServiceDescription $description, Guzzle\Common\Collection $config )
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
getCredentials ( Guzzle\Common\Collection $config )
Methods detail
Factory method for creating the client builder
Parameters
- $namespace
string
$namespace The namespace of the client
Returns
Constructs a client builder
Parameters
- $namespace
string
$namespace The namespace of the client
Sets the config options
Parameters
- $config
array|
Guzzle\Common\Collection
$config The config options
Returns
public
Aws\Common\Client\ClientBuilder
setConfigDefaults( array|Guzzle\Common\Collection
$defaults )
Sets the config options' defaults
Parameters
- $defaults
array|
Guzzle\Common\Collection
$defaults The default values
Returns
public
Aws\Common\Client\ClientBuilder
setConfigRequirements( array|Guzzle\Common\Collection
$required )
Sets the required config options
Parameters
- $required
array|
Guzzle\Common\Collection
$required The required config options
Returns
public
Aws\Common\Client\ClientBuilder
setExceptionParser( Aws\Common\Exception\Parser\ExceptionParserInterface
$parser )
Sets the exception parser. If one is not provided the builder will use the default XML exception parser.
Parameters
- $parser
Aws\Common\Exception\Parser\ExceptionParserInterface
$parser The exception parser
Returns
Set the configuration for the client's iterators
Parameters
- $config
array
$config Configuration data for client's iterators
Returns
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.
Returns
Throws
protected
addBackoffLogger( Guzzle\Plugin\Backoff\BackoffPlugin
$plugin, Guzzle\Common\Collection
$config )
Add backoff logging to the backoff plugin if needed
Parameters
- $plugin
Guzzle\Plugin\Backoff\BackoffPlugin
$plugin Backoff plugin- $config
Guzzle\Common\Collection
$config Configuration settings
Throws
Ensures that an array (e.g. for config data) is actually in array form
Parameters
- $array
array|
Guzzle\Common\Collection
$array The array data
Returns
array
Throws
protected
Guzzle\Service\Description\ServiceDescription
updateConfigFromDescription( Guzzle\Common\Collection
$config )
Update a configuration object from a service description
Parameters
- $config
Guzzle\Common\Collection
$config Config to update
Returns
Throws
protected
Aws\Common\Signature\SignatureInterface
getSignature( Guzzle\Service\Description\ServiceDescription
$description, Guzzle\Common\Collection
$config )
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.
Parameters
- $description
Guzzle\Service\Description\ServiceDescription
$description Description that holds a signature option- $config
Guzzle\Common\Collection
$config Configuration options
Returns
Throws
Magic methods summary
Properties summary
protected static
array
|
$commonConfigDefaults |
#
Default client config |
protected static
array
|
$commonConfigRequirements |
#
Default client requirements |
protected
string
|
$clientNamespace |
#
The namespace of the client |
protected
array
|
$config |
#
The config options |
protected
array
|
$configDefaults |
#
The config defaults |
protected
array
|
$configRequirements |
#
The config requirements |
protected
|
$exceptionParser |
#
The Parser interface for the client |
protected
array
|
$iteratorsConfig |
#
Array of configuration data for iterators available for the client |