CommandInterface
extends
ArrayAccess, ToArrayInterface
in
A command object that contains parameters that can be modified and accessed like an array and turned into an array
Table of Contents
Methods
- execute() : mixed
- Execute the command and return the result
- getClient() : ClientInterface|null
- Get the client object that will execute the command
- getName() : string
- Get the short form name of the command
- getOperation() : OperationInterface
- Get the API operation information about the command
- getRequest() : RequestInterface
- Get the request object associated with the command
- getRequestHeaders() : Collection
- Get the object that manages the request headers that will be set on any outbound requests from the command
- getResponse() : Response
- Get the response object associated with the command
- getResult() : Response
- Get the result of the command
- isExecuted() : bool
- Returns TRUE if the command has been executed
- isPrepared() : bool
- Returns TRUE if the command has been prepared for executing
- prepare() : RequestInterface
- Prepare the command for executing and create a request object.
- setClient() : self
- Set the client object that will execute the command
- setOnComplete() : self
- Specify a callable to execute when the command completes
- setResult() : self
- Set the result of the command
- toArray() : array<string|int, mixed>
- Get the array representation of an object
Methods
execute()
Execute the command and return the result
public
execute() : mixed
Tags
Return values
mixed —Returns the result of CommandInterface::execute
getClient()
Get the client object that will execute the command
public
getClient() : ClientInterface|null
Return values
ClientInterface|nullgetName()
Get the short form name of the command
public
getName() : string
Return values
stringgetOperation()
Get the API operation information about the command
public
getOperation() : OperationInterface
Return values
OperationInterfacegetRequest()
Get the request object associated with the command
public
getRequest() : RequestInterface
Tags
Return values
RequestInterfacegetRequestHeaders()
Get the object that manages the request headers that will be set on any outbound requests from the command
public
getRequestHeaders() : Collection
Return values
CollectiongetResponse()
Get the response object associated with the command
public
getResponse() : Response
Tags
Return values
ResponsegetResult()
Get the result of the command
public
getResult() : Response
Tags
Return values
Response —By default, commands return a Response object unless overridden in a subclass
isExecuted()
Returns TRUE if the command has been executed
public
isExecuted() : bool
Return values
boolisPrepared()
Returns TRUE if the command has been prepared for executing
public
isPrepared() : bool
Return values
boolprepare()
Prepare the command for executing and create a request object.
public
prepare() : RequestInterface
Tags
Return values
RequestInterface —Returns the generated request
setClient()
Set the client object that will execute the command
public
setClient(ClientInterface $client) : self
Parameters
- $client : ClientInterface
-
The client object that will execute the command
Return values
selfsetOnComplete()
Specify a callable to execute when the command completes
public
setOnComplete(mixed $callable) : self
Parameters
- $callable : mixed
-
Callable to execute when the command completes. The callable must accept a CommandInterface object as the only argument.
Tags
Return values
selfsetResult()
Set the result of the command
public
setResult(mixed $result) : self
Parameters
- $result : mixed
-
Result to set
Return values
selftoArray()
Get the array representation of an object
public
toArray() : array<string|int, mixed>