__construct()
__construct(array $config = [], \GuzzleHttp\Command\Guzzle\DescriptionInterface $description = null) : mixed
Builds an Operation object using an array of configuration data.
- name: (string) Name of the command
- httpMethod: (string) HTTP method of the operation
- uri: (string) URI template that can create a relative or absolute URL
- parameters: (array) Associative array of parameters for the command.
Each value must be an array that is used to create {@see \GuzzleHttp\Command\Guzzle\Parameter}
objects.
- summary: (string) This is a short summary of what the operation does
- notes: (string) A longer description of the operation.
- documentationUrl: (string) Reference URL providing more information
about the operation.
- responseModel: (string) The model name used for processing response.
- deprecated: (bool) Set to true if this is a deprecated command
- errorResponses: (array) Errors that could occur when executing the
command. Array of hashes, each with a 'code' (the HTTP response code),
'phrase' (response reason phrase or description of the error), and
'class' (a custom exception class that would be thrown if the error is
encountered).
- data: (array) Any extra data that might be used to help build or
serialize the operation
- additionalParameters: (null|array) Parameter schema to use when an
option is passed to the operation that is not in the schema
Parameters
array |
$config |
Array of configuration data
|
\GuzzleHttp\Command\Guzzle\DescriptionInterface |
$description |
Service description used to resolve models if $ref tags are found
|
Throws
- \InvalidArgumentException
Returns
mixed
—