Class AbstractCommand
Command object to handle preparing and processing client requests and responses of the requests
- Guzzle\Common\Collection implements ArrayAccess, IteratorAggregate, Countable, Guzzle\Common\ToArrayInterface
- 
			 Guzzle\Service\Command\AbstractCommand			
			 implements 
				Guzzle\Service\Command\CommandInterface Guzzle\Service\Command\AbstractCommand			
			 implements 
				Guzzle\Service\Command\CommandInterface
Direct known subclasses
			Guzzle\Service\Command\ClosureCommand, 
			Guzzle\Service\Command\OperationCommand
		
Indirect known subclasses
			Aws\Common\Command\JsonCommand, 
			Aws\Common\Command\QueryCommand, 
			Aws\S3\Command\S3Command
		
Methods summary
- 
            
                
                    public__construct ( array|Collection $parameters = array(), Guzzle\Service\Description\OperationInterface $operation = null )
- 
            
                
                    public__clone ( )Custom clone behavior 
- 
            
                
                    public__invoke ( )Execute the command in the same manner as calling a function 
- 
            
                
                    publicgetName ( )Get the short form name of the command 
- 
            
                
                    publicgetOperation ( )Get the API command information about the command 
- 
            
                
                    publicsetOnComplete ( mixed $callable )Specify a callable to execute when the command completes 
- 
            
                
                    publicexecute ( )Execute the command and return the result 
- 
            
                
                    publicgetClient ( )Get the client object that will execute the command 
- 
            
                
                    publicsetClient ( Guzzle\Service\ClientInterface $client )Set the client object that will execute the command 
- 
            
                
                    publicgetRequest ( )Get the request object associated with the command 
- 
            
                
                    publicgetResponse ( )Get the response object associated with the command 
- 
            
                
                    publicgetResult ( )Get the result of the command 
- 
            
                
                    publicsetResult ( mixed $result )Set the result of the command 
- 
            
                
                    publicisPrepared ( )Returns TRUE if the command has been prepared for executing 
- 
            
                
                    publicisExecuted ( )Returns TRUE if the command has been executed 
- 
            
                
                    publicprepare ( )Prepare the command for executing and create a request object. 
- 
            
                
                    publicsetValidator ( Guzzle\Service\Description\ValidatorInterface $validator )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 Guzzle\Service\Description\SchemaValidator.
- 
            
                
                    publicgetRequestHeaders ( )Get the object that manages the request headers that will be set on any outbound requests from the command 
- 
            
                
                    protectedinit ( )Initialize the command (hook that can be implemented in subclasses) 
- 
            
                
                    abstract protectedbuild ( )Create the request object that will carry out the command 
- 
            
                
                    protectedcreateOperation ( )Hook used to create an operation for concrete commands that are not associated with a service description 
- 
            
                
                    protectedprocess ( )Create the result of the command after the request has been completed. Override this method in subclasses to customize this behavior 
- 
            
                
                    protectedvalidate ( )Validate and prepare the command based on the schema and rules defined by the command's Operation object 
- 
            
                
                    protectedgetValidator ( )Get the validator used to prepare and validate properties. If no validator has been set on the command, then the default Guzzle\Service\Description\SchemaValidatorwill be used.
- 
            
                
                    publicgetValidationErrors ( )Get array of any validation errors If no validator has been set then return false 
Methods detail
                     public 
                    
                    
                
                
__construct( array|Guzzle\Common\Collection $parameters = array(), Guzzle\Service\Description\OperationInterface $operation = null )
                    
                Parameters
- $parameters
- array|- Guzzle\Common\Collection
 $parameters Collection of parameters to set on the command
- $operation
- Guzzle\Service\Description\OperationInterface
 $operation Command definition from description
Overrides
Custom clone behavior
Execute the command in the same manner as calling a function
Returns
Get the short form name of the command
Returns
stringImplementation of
Get the API command information about the command
Returns
Implementation of
Specify a callable to execute when the command completes
Parameters
- $callable
- mixed
 $callable Callable to execute when the command completes. The callable must accept a- Guzzle\Service\Command\CommandInterfaceobject as the only argument.
Returns
Throws
Implementation of
Execute the command and return the result
Returns
Throws
Implementation of
Get the client object that will execute the command
Returns
Implementation of
Set the client object that will execute the command
Parameters
- $client
- Guzzle\Service\ClientInterface
 $client The client object that will execute the command
Returns
Implementation of
Get the request object associated with the command
Returns
Throws
Implementation of
Get the response object associated with the command
Returns
ResponseThrows
Implementation of
Get the result of the command
Returns
ResponseBy default, commands return a Response object unless overridden in a subclass
Throws
Implementation of
Set the result of the command
Parameters
- $result
- mixed
 $result Result to set
Returns
Implementation of
Returns TRUE if the command has been prepared for executing
Returns
booleanImplementation of
Returns TRUE if the command has been executed
Returns
booleanImplementation of
Prepare the command for executing and create a request object.
Returns
Throws
Guzzle\Service\Exception\CommandExceptionif a client object has not been set previously or in the prepare()
Implementation of
                     public 
                    Guzzle\Service\Command\AbstractCommand
                    
                
                
setValidator( Guzzle\Service\Description\ValidatorInterface $validator )
                    
                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 Guzzle\Service\Description\SchemaValidator.
Parameters
- $validator
- Guzzle\Service\Description\ValidatorInterface
 $validator Validator used to prepare and validate properties against a JSON schema
Returns
Get the object that manages the request headers that will be set on any outbound requests from the command
Returns
Implementation of
Initialize the command (hook that can be implemented in subclasses)
Create the request object that will carry out the command
Hook used to create an operation for concrete commands that are not associated with a service description
Returns
Create the result of the command after the request has been completed. Override this method in subclasses to customize this behavior
Validate and prepare the command based on the schema and rules defined by the command's Operation object
Throws
Get the validator used to prepare and validate properties. If no validator
has been set on the command, then the default Guzzle\Service\Description\SchemaValidator will be
used.
Returns
Get array of any validation errors If no validator has been set then return false
Methods inherited from Guzzle\Common\Collection
			add(), 
			clear(), 
			count(), 
			filter(), 
			fromConfig(), 
			get(), 
			getAll(), 
			getIterator(), 
			getKeys(), 
			getPath(), 
			hasKey(), 
			hasValue(), 
			keySearch(), 
			map(), 
			merge(), 
			offsetExists(), 
			offsetGet(), 
			offsetSet(), 
			offsetUnset(), 
			overwriteWith(), 
			remove(), 
			replace(), 
			set(), 
			setPath(), 
			toArray()
		
Magic methods summary
Constants summary
| string | 
HEADERS_OPTION			 | 'command.headers' | |
| string | 
ON_COMPLETE			 | 'command.on_complete' | |
| string | 
RESPONSE_BODY			 | 'command.response_body' | |
| string | 
REQUEST_OPTIONS			 | 'command.request_options' | |
| string | 
HIDDEN_PARAMS			 | 'command.hidden_params' | |
| string | 
DISABLE_VALIDATION			 | 'command.disable_validation' | |
| string | 
RESPONSE_PROCESSING			 | 'command.response_processing' | |
| string | 
TYPE_RAW			 | 'raw' | |
| string | 
TYPE_MODEL			 | 'model' | |
| string | 
TYPE_NO_TRANSLATION			 | 'no_translation' | 
Properties summary
| 
				protected  
				 | $client | 
				#
				 Client object used to execute the command | 
| 
				protected  
				 | $request | 
				#
				 The request object associated with the command | 
| 
				protected  
				mixed
			 | $result | 
				#
				 The result of the command | 
| 
				protected  
				 | $operation | 
				#
				 API information about the command | 
| 
				protected  
				mixed
			 | $onComplete | 
				#
				 callable | 
| 
				protected  
				 | $validator | 
				#
				 Validator used to prepare and validate properties against a JSON schema |