Methods summary
public
|
#
__construct( array $config = array(), Guzzle\Service\Description\ServiceDescriptionInterface $description = null )
Builds an Operation object using an array of configuration data:
- name: (string) Name of the command
- httpMethod: (string) HTTP method of the operation
- uri: (string) URI template that can create a relative or absolute URL
- class: (string) Concrete class that implements this command
- parameters: (array) Associative array of parameters for the command.
Guzzle\Service\Description\Parameter for information.
- summary: (string) This is a short summary of what the operation does
- notes: (string) A longer text field to explain the behavior of the
operation.
- documentationUrl: (string) Reference URL providing more information about
the operation
- responseClass: (string) This is what is returned from the method. Can be a
primitive, PSR-0 compliant
class name, or model.
- responseNotes: (string) Information about the response returned by the
operation
- responseType: (string) One of 'primitive', 'class', 'model', or
'documentation'. If not specified, this
value will be automatically inferred based on whether or not there is a model
matching the
name, if a matching PSR-0 compliant class name is found, or set to
'primitive' by default.
- deprecated: (bool) Set to true if this is a deprecated command
- errorResponses: (array) Errors that could occur when executing the command.
Array of hashes, each with a
'code' (the HTTP response code), 'phrase' (response reason phrase or
description of the
error), and 'class' (a custom exception class that would be thrown if the
error is
encountered).
- data: (array) Any extra data that might be used to help build or serialize
the operation
- additionalParameters: (null|array) Parameter schema to use when an option is
passed to the operation that is
not in the schema
Builds an Operation object using an array of configuration data:
- name: (string) Name of the command
- httpMethod: (string) HTTP method of the operation
- uri: (string) URI template that can create a relative or absolute URL
- class: (string) Concrete class that implements this command
- parameters: (array) Associative array of parameters for the command.
Guzzle\Service\Description\Parameter for information.
- summary: (string) This is a short summary of what the operation does
- notes: (string) A longer text field to explain the behavior of the
operation.
- documentationUrl: (string) Reference URL providing more information about
the operation
- responseClass: (string) This is what is returned from the method. Can be a
primitive, PSR-0 compliant class name, or model.
- responseNotes: (string) Information about the response returned by the
operation
- responseType: (string) One of 'primitive', 'class', 'model', or
'documentation'. If not specified, this value will be automatically inferred
based on whether or not there is a model matching the name, if a matching PSR-0
compliant class name is found, or set to 'primitive' by default.
- deprecated: (bool) Set to true if this is a deprecated command
- errorResponses: (array) Errors that could occur when executing the command.
Array of hashes, each with a 'code' (the HTTP response code), 'phrase' (response
reason phrase or description of the error), and 'class' (a custom exception
class that would be thrown if the error is encountered).
- data: (array) Any extra data that might be used to help build or serialize
the operation
- additionalParameters: (null|array) Parameter schema to use when an option is
passed to the operation that is not in the schema
Parameters
|
public
array
|
#
toArray( )
Get the array representation of an object
Get the array representation of an object
Returns
array
Implementation of
|
public
Guzzle\Service\Description\ServiceDescriptionInterface |null
|
#
getServiceDescription( )
Get the service description that the operation belongs to
Get the service description that the operation belongs to
Returns
Implementation of
|
public
Guzzle\Service\Description\Operation
|
|
public
array
|
#
getParams( )
Get the params of the operation
Get the params of the operation
Returns
array
Implementation of
|
public
array
|
#
getParamNames( )
Returns an array of parameter names
Returns an array of parameter names
Returns
array
Implementation of
|
public
boolean
|
#
hasParam( string $name )
Check if the operation has a specific parameter by name
Check if the operation has a specific parameter by name
Parameters
- $name
string $name Name of the param
Returns
boolean
Implementation of
|
public
Guzzle\Service\Description\Parameter |null
|
#
getParam( string $param )
Get a single parameter of the operation
Get a single parameter of the operation
Parameters
- $param
string $param Parameter to retrieve by name
Returns
Implementation of
|
public
Guzzle\Service\Description\Operation
|
|
public
Guzzle\Service\Description\Operation
|
#
removeParam( string $name )
Remove a parameter from the command
Remove a parameter from the command
Parameters
- $name
string $name Name of the parameter to remove
Returns
|
public
string|null
|
#
getHttpMethod( )
Get the HTTP method of the operation
Get the HTTP method of the operation
Returns
string|null
Implementation of
|
public
Guzzle\Service\Description\Operation
|
#
setHttpMethod( string $httpMethod )
Set the HTTP method of the command
Set the HTTP method of the command
Parameters
- $httpMethod
string $httpMethod Method to set
Returns
|
public
string
|
#
getClass( )
Get the concrete operation class that implements this operation
Get the concrete operation class that implements this operation
Returns
string
Implementation of
|
public
Guzzle\Service\Description\Operation
|
#
setClass( string $className )
Set the concrete class of the command
Set the concrete class of the command
Parameters
- $className
string $className Concrete class name
Returns
|
public
string|null
|
#
getName( )
Get the name of the operation
Get the name of the operation
Returns
string|null
Implementation of
|
public
Guzzle\Service\Description\Operation
|
#
setName( string $name )
Set the name of the command
Set the name of the command
Parameters
- $name
string $name Name of the command
Returns
|
public
string|null
|
#
getSummary( )
Get a short summary of what the operation does
Get a short summary of what the operation does
Returns
string|null
Implementation of
|
public
Guzzle\Service\Description\Operation
|
#
setSummary( string $summary )
Set a short summary of what the operation does
Set a short summary of what the operation does
Parameters
- $summary
string $summary Short summary of the operation
Returns
|
public
string|null
|
#
getNotes( )
Get a longer text field to explain the behavior of the operation
Get a longer text field to explain the behavior of the operation
Returns
string|null
Implementation of
|
public
Guzzle\Service\Description\Operation
|
#
setNotes( string $notes )
Set a longer text field to explain the behavior of the operation.
Set a longer text field to explain the behavior of the operation.
Parameters
- $notes
string $notes Notes on the operation
Returns
|
public
string|null
|
#
getDocumentationUrl( )
Get the documentation URL of the operation
Get the documentation URL of the operation
Returns
string|null
Implementation of
|
public
Guzzle\Service\Description\Operation
|
#
setDocumentationUrl( string $docUrl )
Set the URL pointing to additional documentation on the command
Set the URL pointing to additional documentation on the command
Parameters
- $docUrl
string $docUrl Documentation URL
Returns
|
public
string|null
|
#
getResponseClass( )
Get what is returned from the method. Can be a primitive, class name, or
model. For example, the responseClass could be 'array', which would inherently
use a responseType of 'primitive'. Using a class name would set a responseType
of 'class'. Specifying a model by ID will use a responseType of 'model'.
Get what is returned from the method. Can be a primitive, class name, or
model. For example, the responseClass could be 'array', which would inherently
use a responseType of 'primitive'. Using a class name would set a responseType
of 'class'. Specifying a model by ID will use a responseType of 'model'.
Returns
string|null
Implementation of
|
public
Guzzle\Service\Description\Operation
|
#
setResponseClass( string $responseClass )
Set what is returned from the method. Can be a primitive, class name, or
model. For example: 'array', 'Guzzle\\Foo\\Baz', or 'MyModelName' (to reference
a model by ID).
Set what is returned from the method. Can be a primitive, class name, or
model. For example: 'array', 'Guzzle\\Foo\\Baz', or 'MyModelName' (to reference
a model by ID).
Parameters
- $responseClass
string $responseClass Type of response
Returns
|
public
string
|
#
getResponseType( )
Get information about how the response is unmarshalled: One of 'primitive',
'class', 'model', or 'documentation'
Get information about how the response is unmarshalled: One of 'primitive',
'class', 'model', or 'documentation'
Returns
string
Implementation of
|
public
Guzzle\Service\Description\Operation
|
#
setResponseType( string $responseType )
Set qualifying information about the responseClass. One of 'primitive',
'class', 'model', or 'documentation'
Set qualifying information about the responseClass. One of 'primitive',
'class', 'model', or 'documentation'
Parameters
- $responseType
string $responseType Response type information
Returns
Throws
|
public
string|null
|
#
getResponseNotes( )
Get notes about the response of the operation
Get notes about the response of the operation
Returns
string|null
Implementation of
|
public
Guzzle\Service\Description\Operation
|
#
setResponseNotes( string $notes )
Set notes about the response of the operation
Set notes about the response of the operation
Parameters
- $notes
string $notes Response notes
Returns
|
public
boolean
|
#
getDeprecated( )
Get whether or not the operation is deprecated
Get whether or not the operation is deprecated
Returns
boolean
Implementation of
|
public
Guzzle\Service\Description\Operation
|
#
setDeprecated( boolean $isDeprecated )
Set whether or not the command is deprecated
Set whether or not the command is deprecated
Parameters
- $isDeprecated
boolean $isDeprecated Set to true to mark as deprecated
Returns
|
public
string
|
#
getUri( )
Get the URI that will be merged into the generated request
Get the URI that will be merged into the generated request
Returns
string
Implementation of
|
public
Guzzle\Service\Description\Operation
|
#
setUri( string $uri )
Set the URI template of the command
Set the URI template of the command
Parameters
- $uri
string $uri URI template to set
Returns
|
public
array
|
#
getErrorResponses( )
Get the errors that could be encountered when executing the operation
Get the errors that could be encountered when executing the operation
Returns
array
Implementation of
|
public
Guzzle\Service\Description\Operation
|
#
addErrorResponse( string $code, string $reason, string $class )
Add an error to the command
Add an error to the command
Parameters
- $code
string $code HTTP response code
- $reason
string $reason HTTP response reason phrase or information about the error
- $class
string $class Exception class associated with the error
Returns
|
public
Guzzle\Service\Description\Operation
|
#
setErrorResponses( array $errorResponses )
Set all of the error responses of the operation
Set all of the error responses of the operation
Parameters
- $errorResponses
array $errorResponses Hash of error name to a hash containing a code, reason, class
Returns
|
public
mixed|null
|
#
getData( string $name )
Get extra data from the operation
Get extra data from the operation
Parameters
- $name
string $name Name of the data point to retrieve
Returns
mixed|null
Implementation of
|
public
Guzzle\Service\Description\Operation
|
#
setData( string $name, mixed $value )
Set a particular data point on the operation
Set a particular data point on the operation
Parameters
- $name
string $name Name of the data value
- $value
mixed $value Value to set
Returns
|
public
Paramter|null
|
#
getAdditionalParameters( )
Get the additionalParameters of the operation
Get the additionalParameters of the operation
Returns
Paramter|null
|
public
Guzzle\Service\Description\Operation
|
|
protected
|
#
inferResponseType( )
Infer the response type from the responseClass value
Infer the response type from the responseClass value
|
Properties summary
protected static
array
|
$properties
|
array(
'name' => true, 'httpMethod' => true, 'uri' => true, 'class' => true, 'responseClass' => true,
'responseType' => true, 'responseNotes' => true, 'notes' => true, 'summary' => true, 'documentationUrl' => true,
'deprecated' => true, 'data' => true, 'parameters' => true, 'additionalParameters' => true,
'errorResponses' => true
) |
#
Hashmap of properties that can be specified. Represented as a hash to speed
up constructor.
Hashmap of properties that can be specified. Represented as a hash to speed
up constructor.
|
protected
array
|
$parameters
|
array() |
|
protected
Guzzle\Service\Description\Parameter
|
$additionalParameters
|
|
#
Additional parameters schema
Additional parameters schema
|
protected
string
|
$name
|
|
|
protected
string
|
$httpMethod
|
|
|
protected
string
|
$summary
|
|
#
This is a short summary of what the operation does
This is a short summary of what the operation does
|
protected
string
|
$notes
|
|
#
A longer text field to explain the behavior of the operation.
A longer text field to explain the behavior of the operation.
|
protected
string
|
$documentationUrl
|
|
#
Reference URL providing more information about the operation
Reference URL providing more information about the operation
|
protected
string
|
$uri
|
|
|
protected
string
|
$class
|
|
#
Class of the command object
Class of the command object
|
protected
string
|
$responseClass
|
|
#
This is what is returned from the method
This is what is returned from the method
|
protected
string
|
$responseType
|
|
#
Type information about the response
Type information about the response
|
protected
string
|
$responseNotes
|
|
#
Information about the response returned by the operation
Information about the response returned by the operation
|
protected
boolean
|
$deprecated
|
|
#
Whether or not the command is deprecated
Whether or not the command is deprecated
|
protected
array
|
$errorResponses
|
|
#
Array of errors that could occur when running the command
Array of errors that could occur when running the command
|
protected
Guzzle\Service\Description\ServiceDescriptionInterface
|
$description
|
|
|
protected
array
|
$data
|
|
#
Extra operation information
Extra operation information
|