Open Journal Systems  3.3.0
Guzzle\Service\Command\CommandInterface Interface Reference
Inheritance diagram for Guzzle\Service\Command\CommandInterface:
Guzzle\Common\ToArrayInterface Guzzle\Service\Command\AbstractCommand Guzzle\Service\Command\ClosureCommand Guzzle\Service\Command\OperationCommand Guzzle\Tests\Service\Mock\Command\MockCommand Guzzle\Tests\Service\Mock\Command\IterableCommand Guzzle\Tests\Service\Mock\Command\OtherCommand Guzzle\Tests\Service\Mock\Command\Sub\Sub

Public Member Functions

 execute ()
 
 getClient ()
 
 getName ()
 
 getOperation ()
 
 getRequest ()
 
 getRequestHeaders ()
 
 getResponse ()
 
 getResult ()
 
 isExecuted ()
 
 isPrepared ()
 
 prepare ()
 
 setClient (ClientInterface $client)
 
 setOnComplete ($callable)
 
 setResult ($result)
 
- Public Member Functions inherited from Guzzle\Common\ToArrayInterface
 toArray ()
 

Detailed Description

A command object that contains parameters that can be modified and accessed like an array and turned into an array

Definition at line 17 of file CommandInterface.php.

Member Function Documentation

◆ execute()

Guzzle\Service\Command\CommandInterface::execute ( )

Execute the command and return the result

Returns
mixed Returns the result of {
See also
CommandInterface::execute}
Exceptions
CommandExceptionif a client has not been associated with the command

Implemented in Guzzle\Service\Command\AbstractCommand.

◆ getClient()

Guzzle\Service\Command\CommandInterface::getClient ( )

Get the client object that will execute the command

Returns
ClientInterface|null

Implemented in Guzzle\Service\Command\AbstractCommand.

Referenced by Guzzle\Service\Command\DefaultRequestSerializer\createRequest(), and Guzzle\Service\Command\OperationResponseParser\parseClass().

◆ getName()

◆ getOperation()

◆ getRequest()

Guzzle\Service\Command\CommandInterface::getRequest ( )

Get the request object associated with the command

Returns
RequestInterface
Exceptions
CommandExceptionif the command has not been executed

Implemented in Guzzle\Service\Command\AbstractCommand.

Referenced by Guzzle\Service\Exception\CommandTransferException\getExceptionForFailedCommand(), and Guzzle\Service\Command\DefaultResponseParser\parse().

◆ getRequestHeaders()

Guzzle\Service\Command\CommandInterface::getRequestHeaders ( )

Get the object that manages the request headers that will be set on any outbound requests from the command

Returns
Collection

Implemented in Guzzle\Service\Command\AbstractCommand.

◆ getResponse()

Guzzle\Service\Command\CommandInterface::getResponse ( )

Get the response object associated with the command

Returns
Response
Exceptions
CommandExceptionif the command has not been executed

Implemented in Guzzle\Service\Command\AbstractCommand.

Referenced by Guzzle\Service\Command\LocationVisitor\Response\XmlVisitor\before(), and Guzzle\Service\Command\LocationVisitor\Response\JsonVisitor\before().

◆ getResult()

Guzzle\Service\Command\CommandInterface::getResult ( )

Get the result of the command

Returns
Response By default, commands return a Response object unless overridden in a subclass
Exceptions
CommandExceptionif the command has not been executed

Implemented in Guzzle\Service\Command\AbstractCommand.

◆ isExecuted()

Guzzle\Service\Command\CommandInterface::isExecuted ( )

Returns TRUE if the command has been executed

Returns
bool

Implemented in Guzzle\Service\Command\AbstractCommand.

◆ isPrepared()

Guzzle\Service\Command\CommandInterface::isPrepared ( )

Returns TRUE if the command has been prepared for executing

Returns
bool

Implemented in Guzzle\Service\Command\AbstractCommand.

◆ prepare()

Guzzle\Service\Command\CommandInterface::prepare ( )

Prepare the command for executing and create a request object.

Returns
RequestInterface Returns the generated request
Exceptions
CommandExceptionif a client object has not been set previously or in the prepare()

Implemented in Guzzle\Service\Command\AbstractCommand.

◆ setClient()

Guzzle\Service\Command\CommandInterface::setClient ( ClientInterface  $client)

Set the client object that will execute the command

Parameters
ClientInterface$clientThe client object that will execute the command
Returns
self

Implemented in Guzzle\Service\Command\AbstractCommand.

Referenced by Guzzle\Service\Client\prepareCommand().

◆ setOnComplete()

Guzzle\Service\Command\CommandInterface::setOnComplete (   $callable)

Specify a callable to execute when the command completes

Parameters
mixed$callableCallable to execute when the command completes. The callable must accept a {
See also
CommandInterface} object as the only argument.
Returns
self
Exceptions
InvalidArgumentException

Implemented in Guzzle\Service\Command\AbstractCommand.

◆ setResult()

Guzzle\Service\Command\CommandInterface::setResult (   $result)

Set the result of the command

Parameters
mixed$resultResult to set
Returns
self

Implemented in Guzzle\Service\Command\AbstractCommand.


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