Methods summary
public static
Guzzle\Service\Builder\ServiceBuilderInterface
|
#
factory( array|string $config = null, array $globalParameters = array() )
Create a new ServiceBuilder using configuration data sourced from an array,
.js|.json or .php file.
Create a new ServiceBuilder using configuration data sourced from an array,
.js|.json or .php file.
Parameters
- $config
array|string $config The full path to an .json|.js or .php file, or an associative array
- $globalParameters
array $globalParameters Array of global parameters to pass to every service as it is
instantiated.
Returns
Throws
|
public
|
#
__construct( array $serviceBuilderConfig )
Construct a new service builder
Construct a new service builder
Parameters
- $serviceBuilderConfig
array $serviceBuilderConfig Service configuration settings: - name: Name of the
service - class: Client class to instantiate using a factory method - params:
array of key value pair configuration settings for the builder
|
public static
array
|
#
getAllEvents( )
Get a list of all of the events emitted from the class
Get a list of all of the events emitted from the class
Returns
array
Overrides
|
public
|
#
unserialize( string $serialized )
Restores the service builder from JSON
Restores the service builder from JSON
Parameters
- $serialized
string $serialized JSON data to restore from
Implementation of
|
public
array
|
#
serialize( )
Represents the service builder as a string
Represents the service builder as a string
Returns
array
Implementation of
|
public
Guzzle\Service\Builder\ServiceBuilder
|
|
public
array|null
|
#
getData( string $name )
Get data from the service builder without triggering the building of a
service
Get data from the service builder without triggering the building of a
service
Parameters
- $name
string $name Name of the service to retrieve
Returns
array|null
|
public
FromConfigInterface
|
#
get( string $name, boolean|array $throwAway = false )
Get a service using a registered builder
Get a service using a registered builder
Parameters
- $name
string $name Name of the registered client to retrieve
- $throwAway
boolean|array $throwAway Set to TRUE to not store the client for later retrieval from the
ServiceBuilder. If an array is specified, that data will overwrite the
configured params
Returns
FromConfigInterface
Throws
Implementation of
|
public
Guzzle\Service\Builder\ServiceBuilderInterface
|
#
set( string $key, mixed $service )
Register a service by name with the service builder
Register a service by name with the service builder
Parameters
- $key
string $key Name of the client to register
- $service
mixed $service Service to register
Returns
Implementation of
|
public
|
#
offsetSet( string $offset, Guzzle\Http\ClientInterface $value )
Register a client by name with the service builder
Register a client by name with the service builder
Parameters
Implementation of
|
public
|
#
offsetUnset( string $offset )
Remove a registered client by name
Remove a registered client by name
Parameters
- $offset
string $offset Client to remove by name
Implementation of
|
public
boolean
|
#
offsetExists( string $offset )
Check if a client is registered with the service builder by name
Check if a client is registered with the service builder by name
Parameters
- $offset
string $offset Name to check to see if a client exists
Returns
boolean
Implementation of
|
public
Guzzle\Http\ClientInterface
|
#
offsetGet( string $offset )
Get a registered client by name
Get a registered client by name
Parameters
- $offset
string $offset Registered client name to retrieve
Returns
Implementation of
|