Open Journal Systems  3.3.0
Guzzle\Service\Command\ClosureCommand Class Reference
Inheritance diagram for Guzzle\Service\Command\ClosureCommand:
Guzzle\Service\Command\AbstractCommand Guzzle\Common\Collection Guzzle\Service\Command\CommandInterface Guzzle\Common\ToArrayInterface Guzzle\Common\ToArrayInterface

Protected Member Functions

 build ()
 
 init ()
 
- Protected Member Functions inherited from Guzzle\Service\Command\AbstractCommand
 createOperation ()
 
 getValidator ()
 
 process ()
 
 validate ()
 

Additional Inherited Members

- Public Member Functions inherited from Guzzle\Service\Command\AbstractCommand
 __clone ()
 
 __construct ($parameters=array(), OperationInterface $operation=null)
 
 __invoke ()
 
 execute ()
 
 getClient ()
 
 getName ()
 
 getOperation ()
 
 getRequest ()
 
 getRequestHeaders ()
 
 getResponse ()
 
 getResult ()
 
 getValidationErrors ()
 
 isExecuted ()
 
 isPrepared ()
 
 prepare ()
 
 setClient (ClientInterface $client)
 
 setOnComplete ($callable)
 
 setResult ($result)
 
 setValidator (ValidatorInterface $validator)
 
- Public Member Functions inherited from Guzzle\Common\Collection
 __construct (array $data=array())
 
 add ($key, $value)
 
 clear ()
 
 count ()
 
 filter (\Closure $closure, $static=true)
 
 get ($key)
 
 getAll (array $keys=null)
 
 getIterator ()
 
 getKeys ()
 
 getPath ($path, $separator='/', $data=null)
 
 hasKey ($key)
 
 hasValue ($value)
 
 inject ($input)
 
 keySearch ($key)
 
 map (\Closure $closure, array $context=array(), $static=true)
 
 merge ($data)
 
 offsetExists ($offset)
 
 offsetGet ($offset)
 
 offsetSet ($offset, $value)
 
 offsetUnset ($offset)
 
 overwriteWith ($data)
 
 remove ($key)
 
 replace (array $data)
 
 set ($key, $value)
 
 setPath ($path, $value)
 
 toArray ()
 
- Static Public Member Functions inherited from Guzzle\Common\Collection
static fromConfig (array $config=array(), array $defaults=array(), array $required=array())
 
- Data Fields inherited from Guzzle\Service\Command\AbstractCommand
const DISABLE_VALIDATION = 'command.disable_validation'
 
const HEADERS_OPTION = 'command.headers'
 
const HIDDEN_PARAMS = 'command.hidden_params'
 
const ON_COMPLETE = 'command.on_complete'
 
const REQUEST_OPTIONS = 'command.request_options'
 
const RESPONSE_BODY = 'command.response_body'
 
const RESPONSE_PROCESSING = 'command.response_processing'
 
const TYPE_MODEL = 'model'
 
const TYPE_NO_TRANSLATION = 'no_translation'
 
const TYPE_RAW = 'raw'
 
- Protected Attributes inherited from Guzzle\Service\Command\AbstractCommand
 $client
 
 $onComplete
 
 $operation
 
 $request
 
 $result
 
 $validator
 
- Protected Attributes inherited from Guzzle\Common\Collection
 $data
 

Detailed Description

A ClosureCommand is a command that allows dynamic commands to be created at runtime using a closure to prepare the request. A closure key and \Closure value must be passed to the command in the constructor. The closure must accept the command object as an argument.

Definition at line 14 of file ClosureCommand.php.

Member Function Documentation

◆ build()

Guzzle\Service\Command\ClosureCommand::build ( )
protected

{Create the request object that will carry out the command}

Exceptions
UnexpectedValueExceptionIf the closure does not return a request

Reimplemented from Guzzle\Service\Command\AbstractCommand.

Definition at line 31 of file ClosureCommand.php.

◆ init()

Guzzle\Service\Command\ClosureCommand::init ( )
protected

{Initialize the command (hook that can be implemented in subclasses)}

Exceptions
InvalidArgumentExceptionif a closure was not passed

Reimplemented from Guzzle\Service\Command\AbstractCommand.

Definition at line 20 of file ClosureCommand.php.


The documentation for this class was generated from the following file: