Class Guzzle\Service\Command\OperationCommand

InheritanceGuzzle\Service\Command\OperationCommand » Guzzle\Service\Command\AbstractCommand » Guzzle\Common\Collection
ImplementsArrayAccess, Countable, Guzzle\Common\ToArrayInterface, Guzzle\Service\Command\CommandInterface, IteratorAggregate

A command that creates requests based on {@see Guzzle\Service\Description\OperationInterface} objects, and if the matching operation uses a service description model in the responseClass attribute, then this command will marshal the response into an associative array based on the JSON schema of the model.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__clone() Custom clone behavior Guzzle\Service\Command\AbstractCommand
__construct() Guzzle\Service\Command\AbstractCommand
__invoke() Execute the command in the same manner as calling a function Guzzle\Service\Command\AbstractCommand
add() Add a value to a key. If a key of the same name has already been added, the key value will be converted into an array and the new value will be pushed to the end of the array. Guzzle\Common\Collection
clear() Removes all key value pairs Guzzle\Common\Collection
count() Guzzle\Common\Collection
execute() Guzzle\Service\Command\AbstractCommand
filter() Iterates over each key value pair in the collection passing them to the Closure. If the Closure function returns true, the current value from input is returned into the result Collection. The Closure must accept three parameters: (string) $key, (string) $value and return Boolean TRUE or FALSE for each value. Guzzle\Common\Collection
fromConfig() Create a new collection from an array, validate the keys, and add default values where missing Guzzle\Common\Collection
get() Get a specific key value. Guzzle\Common\Collection
getAll() Get all or a subset of matching key value pairs Guzzle\Common\Collection
getClient() Guzzle\Service\Command\AbstractCommand
getIterator() Guzzle\Common\Collection
getKeys() Get all keys in the collection Guzzle\Common\Collection
getName() Guzzle\Service\Command\AbstractCommand
getOperation() Get the API command information about the command Guzzle\Service\Command\AbstractCommand
getPath() Gets a value from the collection using an array path (e.g. foo/baz/bar would retrieve bar from two nested arrays) Allows for wildcard searches which recursively combine matches up to the level at which the wildcard occurs. This can be useful for accepting any key of a sub-array and combining matching keys from each diverging path. Guzzle\Common\Collection
getRequest() Guzzle\Service\Command\AbstractCommand
getRequestHeaders() Guzzle\Service\Command\AbstractCommand
getRequestSerializer() Get the request serializer used with the command Guzzle\Service\Command\OperationCommand
getResponse() Guzzle\Service\Command\AbstractCommand
getResponseParser() Get the response parser used for the operation Guzzle\Service\Command\OperationCommand
getResult() Guzzle\Service\Command\AbstractCommand
getValidationErrors() Get array of any validation errors If no validator has been set then return false Guzzle\Service\Command\AbstractCommand
hasKey() Returns whether or not the specified key is present. Guzzle\Common\Collection
hasValue() Checks if any keys contains a certain value Guzzle\Common\Collection
inject() Inject configuration settings into an input string Guzzle\Common\Collection
isExecuted() Guzzle\Service\Command\AbstractCommand
isPrepared() Guzzle\Service\Command\AbstractCommand
keySearch() Case insensitive search the keys in the collection Guzzle\Common\Collection
map() Returns a Collection containing all the elements of the collection after applying the callback function to each one. The Closure should accept three parameters: (string) $key, (string) $value, (array) $context and return a modified value Guzzle\Common\Collection
merge() Add and merge in a Collection or array of key value pair data. Guzzle\Common\Collection
offsetExists() Guzzle\Common\Collection
offsetGet() Guzzle\Common\Collection
offsetSet() Guzzle\Common\Collection
offsetUnset() Guzzle\Common\Collection
overwriteWith() Over write key value pairs in this collection with all of the data from an array or collection. Guzzle\Common\Collection
prepare() Guzzle\Service\Command\AbstractCommand
remove() Remove a specific key value pair Guzzle\Common\Collection
replace() Replace the data of the object with the value of an array Guzzle\Common\Collection
set() Set a key value pair Guzzle\Common\Collection
setClient() Guzzle\Service\Command\AbstractCommand
setOnComplete() Guzzle\Service\Command\AbstractCommand
setPath() Set a value into a nested array key. Keys will be created as needed to set the value. Guzzle\Common\Collection
setRequestSerializer() Set the request serializer used with the command Guzzle\Service\Command\OperationCommand
setResponseParser() Set the response parser used with the command Guzzle\Service\Command\OperationCommand
setResult() Guzzle\Service\Command\AbstractCommand
setValidator() Set the validator used to validate and prepare command parameters and nested JSON schemas. If no validator is set, then the command will validate using the default {@see SchemaValidator}. Guzzle\Service\Command\AbstractCommand
toArray() Get the array representation of an object Guzzle\Common\ToArrayInterface

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
build() Guzzle\Service\Command\OperationCommand
createOperation() Hook used to create an operation for concrete commands that are not associated with a service description Guzzle\Service\Command\AbstractCommand
getValidator() Get the validator used to prepare and validate properties. If no validator has been set on the command, then the default {@see SchemaValidator} will be used. Guzzle\Service\Command\AbstractCommand
init() Initialize the command (hook that can be implemented in subclasses) Guzzle\Service\Command\AbstractCommand
process() Guzzle\Service\Command\OperationCommand
validate() Validate and prepare the command based on the schema and rules defined by the command's Operation object Guzzle\Service\Command\AbstractCommand

Constants

Hide inherited constants

ConstantValueDescriptionDefined By
DISABLE_VALIDATION 'command.disable_validation' Guzzle\Service\Command\AbstractCommand
HEADERS_OPTION 'command.headers' Guzzle\Service\Command\AbstractCommand
HIDDEN_PARAMS 'command.hidden_params' Guzzle\Service\Command\AbstractCommand
ON_COMPLETE 'command.on_complete' Guzzle\Service\Command\AbstractCommand
REQUEST_OPTIONS 'command.request_options' Guzzle\Service\Command\AbstractCommand
RESPONSE_BODY 'command.response_body' Guzzle\Service\Command\AbstractCommand
RESPONSE_PROCESSING 'command.response_processing' Guzzle\Service\Command\AbstractCommand
TYPE_MODEL 'model' Guzzle\Service\Command\AbstractCommand
TYPE_NO_TRANSLATION 'no_translation' Guzzle\Service\Command\AbstractCommand
TYPE_RAW 'raw' Guzzle\Service\Command\AbstractCommand

Property Details

$requestSerializer protected property
$responseParser protected property

Response parser

Method Details

build() protected method

protected void build ( )
getRequestSerializer() public method

Get the request serializer used with the command

public Guzzle\Service\Command\RequestSerializerInterface getRequestSerializer ( )
getResponseParser() public method

Get the response parser used for the operation

public Guzzle\Service\Command\ResponseParserInterface getResponseParser ( )
process() protected method

protected void process ( )
setRequestSerializer() public method

Set the request serializer used with the command

public self setRequestSerializer ( Guzzle\Service\Command\RequestSerializerInterface $serializer )
$serializer Guzzle\Service\Command\RequestSerializerInterface

Request serializer

setResponseParser() public method

Set the response parser used with the command

public self setResponseParser ( Guzzle\Service\Command\ResponseParserInterface $parser )
$parser Guzzle\Service\Command\ResponseParserInterface

Response parser