Class ServiceDescription
A ServiceDescription stores service information based on a service document
- Guzzle\Service\Description\ServiceDescription implements Guzzle\Service\Description\ServiceDescriptionInterface, Guzzle\Common\ToArrayInterface
Methods summary
-
public staticfactory ( string|array $config, array $options = array() ) -
public__construct ( array $config = array() ) -
publicserialize ( ) -
publicunserialize ( mixed $json ) -
publictoArray ( )Get the array representation of an object
-
publicgetBaseUrl ( )Get the basePath/baseUrl of the description
-
publicsetBaseUrl ( string $baseUrl )Set the baseUrl of the description
-
publicgetOperations ( )Get the API operations of the service
-
publichasOperation ( string $name )Check if the service has an operation by name
-
publicgetOperation ( string $name )Get an API operation by name
-
publicaddOperation ( Guzzle\Service\Description\OperationInterface $operation )Add a operation to the service description
-
publicgetModel ( string $id )Get a specific model from the description
-
publicgetModels ( )Get all service description models
-
publichasModel ( string $id )Check if the description has a specific model by name
-
publicaddModel ( Guzzle\Service\Description\Parameter $model )Add a model to the service description
-
publicgetApiVersion ( )Get the API version of the service
-
publicgetName ( )Get the name of the API
-
publicgetDescription ( )Get a summary of the purpose of the API
-
publicgetData ( string $key )Get arbitrary data from the service description that is not part of the Guzzle spec
-
publicsetData ( string $key, mixed $value )Set arbitrary data on the service description
-
protectedfromArray ( array $config )Initialize the state from an array
Methods detail
public static
Guzzle\Service\Description\ServiceDescription
factory( string|array $config, array $options = array() )
Parameters
- $config
string|array
$config File to build or array of operation information- $options
array
$options Service description factory options
Returns
Parameters
- $config
array
$config Array of configuration data
Implementation of
Implementation of
Get the array representation of an object
Returns
arrayImplementation of
Get the basePath/baseUrl of the description
Returns
stringImplementation of
Set the baseUrl of the description
Parameters
- $baseUrl
string
$baseUrl Base URL of each operation
Returns
Get the API operations of the service
Returns
Implementation of
Check if the service has an operation by name
Parameters
- $name
string
$name Name of the operation to check
Returns
booleanImplementation of
Get an API operation by name
Parameters
- $name
string
$name Name of the command
Returns
Implementation of
public
Guzzle\Service\Description\ServiceDescription
addOperation( Guzzle\Service\Description\OperationInterface $operation )
Add a operation to the service description
Parameters
- $operation
Guzzle\Service\Description\OperationInterface
$operation Operation to add
Returns
Get a specific model from the description
Parameters
- $id
string
$id ID of the model
Returns
Implementation of
Get all service description models
Returns
arrayImplementation of
Check if the description has a specific model by name
Parameters
- $id
string
$id ID of the model
Returns
booleanImplementation of
public
Guzzle\Service\Description\ServiceDescription
addModel( Guzzle\Service\Description\Parameter $model )
Add a model to the service description
Parameters
- $model
Guzzle\Service\Description\Parameter
$model Model to add
Returns
Get the API version of the service
Returns
stringImplementation of
Get the name of the API
Returns
stringImplementation of
Get a summary of the purpose of the API
Returns
stringImplementation of
Get arbitrary data from the service description that is not part of the Guzzle spec
Parameters
- $key
string
$key Data key to retrieve
Returns
null|mixedImplementation of
Set arbitrary data on the service description
Parameters
- $key
string
$key Data key to set- $value
mixed
$value Value to set
Returns
Implementation of
Initialize the state from an array
Parameters
- $config
array
$config Configuration data
Throws
Magic methods summary
Properties summary
protected
array
|
$operations |
#
Array of |
protected
array
|
$models |
#
Array of API models |
protected
string
|
$name |
#
Name of the API |
protected
string
|
$apiVersion |
#
API version |
protected
string
|
$description |
#
Summary of the API |
protected
array
|
$extraData |
#
Any extra API data |
protected static
|
$descriptionLoader |
#
Factory used in factory method |
protected
string
|
$baseUrl |
#
baseUrl/basePath |