Open Journal Systems
3.3.0
|
Public Member Functions | |
__construct (array $config=array(), ServiceDescriptionInterface $description=null) | |
addErrorResponse ($code, $reason, $class) | |
addParam (Parameter $param) | |
getAdditionalParameters () | |
getClass () | |
getData ($name) | |
getDeprecated () | |
getDocumentationUrl () | |
getErrorResponses () | |
getHttpMethod () | |
getName () | |
getNotes () | |
getParam ($param) | |
getParamNames () | |
getParams () | |
getResponseClass () | |
getResponseNotes () | |
getResponseType () | |
getServiceDescription () | |
getSummary () | |
getUri () | |
hasParam ($name) | |
removeParam ($name) | |
setAdditionalParameters ($parameter) | |
setClass ($className) | |
setData ($name, $value) | |
setDeprecated ($isDeprecated) | |
setDocumentationUrl ($docUrl) | |
setErrorResponses (array $errorResponses) | |
setHttpMethod ($httpMethod) | |
setName ($name) | |
setNotes ($notes) | |
setResponseClass ($responseClass) | |
setResponseNotes ($notes) | |
setResponseType ($responseType) | |
setServiceDescription (ServiceDescriptionInterface $description) | |
setSummary ($summary) | |
setUri ($uri) | |
toArray () | |
Data Fields | |
const | DEFAULT_COMMAND_CLASS = 'Guzzle\\Service\\Command\\OperationCommand' |
![]() | |
const | TYPE_CLASS = 'class' |
const | TYPE_DOCUMENTATION = 'documentation' |
const | TYPE_MODEL = 'model' |
const | TYPE_PRIMITIVE = 'primitive' |
Protected Member Functions | |
inferResponseType () | |
Protected Attributes | |
$additionalParameters | |
$class | |
$data | |
$deprecated | |
$description | |
$documentationUrl | |
$errorResponses | |
$httpMethod | |
$name | |
$notes | |
$parameters = array() | |
$responseClass | |
$responseNotes | |
$responseType | |
$summary | |
$uri | |
Static Protected Attributes | |
static | $properties |
Data object holding the information of an API command
Definition at line 10 of file Operation.php.
Guzzle\Service\Description\Operation::__construct | ( | array | $config = array() , |
ServiceDescriptionInterface | $description = null |
||
) |
Builds an Operation object using an array of configuration data:
array | $config | Array of configuration data |
ServiceDescriptionInterface | $description | Service description used to resolve models if $ref tags are found |
Definition at line 147 of file Operation.php.
References Guzzle\Service\Description\Operation\$description, Guzzle\Service\Description\Operation\$name, Guzzle\Service\Description\Operation\addParam(), Guzzle\Service\Description\Operation\inferResponseType(), and Guzzle\Service\Description\Operation\setResponseType().
Guzzle\Service\Description\Operation::addErrorResponse | ( | $code, | |
$reason, | |||
$class | |||
) |
Add an error to the command
string | $code | HTTP response code |
string | $reason | HTTP response reason phrase or information about the error |
string | $class | Exception class associated with the error |
Definition at line 514 of file Operation.php.
References Guzzle\Service\Description\Operation\$class.
Guzzle\Service\Description\Operation::addParam | ( | Parameter | $param | ) |
Add a parameter to the command
Definition at line 256 of file Operation.php.
References Guzzle\Service\Description\Parameter\getName(), and Guzzle\Service\Description\Parameter\setParent().
Referenced by Guzzle\Service\Description\Operation\__construct().
Guzzle\Service\Description\Operation::getAdditionalParameters | ( | ) |
Get the additionalParameters of the operation
Definition at line 560 of file Operation.php.
References Guzzle\Service\Description\Operation\$additionalParameters.
Guzzle\Service\Description\Operation::getClass | ( | ) |
Get the concrete operation class that implements this operation
Implements Guzzle\Service\Description\OperationInterface.
Definition at line 297 of file Operation.php.
References Guzzle\Service\Description\Operation\$class.
Guzzle\Service\Description\Operation::getData | ( | $name | ) |
Get extra data from the operation
string | $name | Name of the data point to retrieve |
Implements Guzzle\Service\Description\OperationInterface.
Definition at line 535 of file Operation.php.
References Guzzle\Service\Description\Operation\$name.
Referenced by Guzzle\Service\Command\LocationVisitor\Request\XmlVisitor\createRootElement().
Guzzle\Service\Description\Operation::getDeprecated | ( | ) |
Get whether or not the operation is deprecated
Implements Guzzle\Service\Description\OperationInterface.
Definition at line 462 of file Operation.php.
References Guzzle\Service\Description\Operation\$deprecated.
Guzzle\Service\Description\Operation::getDocumentationUrl | ( | ) |
Get the documentation URL of the operation
Implements Guzzle\Service\Description\OperationInterface.
Definition at line 373 of file Operation.php.
References Guzzle\Service\Description\Operation\$documentationUrl.
Guzzle\Service\Description\Operation::getErrorResponses | ( | ) |
Get the errors that could be encountered when executing the operation
Implements Guzzle\Service\Description\OperationInterface.
Definition at line 500 of file Operation.php.
References Guzzle\Service\Description\Operation\$errorResponses.
Referenced by Guzzle\Plugin\ErrorResponse\ErrorResponsePlugin\getErrorClosure().
Guzzle\Service\Description\Operation::getHttpMethod | ( | ) |
Get the HTTP method of the operation
Implements Guzzle\Service\Description\OperationInterface.
Definition at line 278 of file Operation.php.
References Guzzle\Service\Description\Operation\$httpMethod.
Guzzle\Service\Description\Operation::getName | ( | ) |
Get the name of the operation
Implements Guzzle\Service\Description\OperationInterface.
Definition at line 316 of file Operation.php.
References Guzzle\Service\Description\Operation\$name.
Guzzle\Service\Description\Operation::getNotes | ( | ) |
Get a longer text field to explain the behavior of the operation
Implements Guzzle\Service\Description\OperationInterface.
Definition at line 354 of file Operation.php.
References Guzzle\Service\Description\Operation\$notes.
Guzzle\Service\Description\Operation::getParam | ( | $param | ) |
Get a single parameter of the operation
string | $param | Parameter to retrieve by name |
Implements Guzzle\Service\Description\OperationInterface.
Definition at line 244 of file Operation.php.
Guzzle\Service\Description\Operation::getParamNames | ( | ) |
Returns an array of parameter names
Implements Guzzle\Service\Description\OperationInterface.
Definition at line 234 of file Operation.php.
Guzzle\Service\Description\Operation::getParams | ( | ) |
Get the params of the operation
Implements Guzzle\Service\Description\OperationInterface.
Definition at line 229 of file Operation.php.
References Guzzle\Service\Description\Operation\$parameters.
Guzzle\Service\Description\Operation::getResponseClass | ( | ) |
Get what is returned from the method. Can be a primitive, class name, or model. For example, the responseClass could be 'array', which would inherently use a responseType of 'primitive'. Using a class name would set a responseType of 'class'. Specifying a model by ID will use a responseType of 'model'.
Implements Guzzle\Service\Description\OperationInterface.
Definition at line 392 of file Operation.php.
References Guzzle\Service\Description\Operation\$responseClass.
Guzzle\Service\Description\Operation::getResponseNotes | ( | ) |
Get notes about the response of the operation
Implements Guzzle\Service\Description\OperationInterface.
Definition at line 443 of file Operation.php.
References Guzzle\Service\Description\Operation\$responseNotes.
Guzzle\Service\Description\Operation::getResponseType | ( | ) |
Get information about how the response is unmarshalled: One of 'primitive', 'class', 'model', or 'documentation'
Implements Guzzle\Service\Description\OperationInterface.
Definition at line 413 of file Operation.php.
References Guzzle\Service\Description\Operation\$responseType.
Guzzle\Service\Description\Operation::getServiceDescription | ( | ) |
Get the service description that the operation belongs to
Implements Guzzle\Service\Description\OperationInterface.
Definition at line 217 of file Operation.php.
References Guzzle\Service\Description\Operation\$description.
Guzzle\Service\Description\Operation::getSummary | ( | ) |
Get a short summary of what the operation does
Implements Guzzle\Service\Description\OperationInterface.
Definition at line 335 of file Operation.php.
References Guzzle\Service\Description\Operation\$summary.
Guzzle\Service\Description\Operation::getUri | ( | ) |
Get the URI that will be merged into the generated request
Implements Guzzle\Service\Description\OperationInterface.
Definition at line 481 of file Operation.php.
References Guzzle\Service\Description\Operation\$uri.
Guzzle\Service\Description\Operation::hasParam | ( | $name | ) |
Check if the operation has a specific parameter by name
string | $name | Name of the param |
Implements Guzzle\Service\Description\OperationInterface.
Definition at line 239 of file Operation.php.
References Guzzle\Service\Description\Operation\$name.
|
protected |
Infer the response type from the responseClass value
Definition at line 584 of file Operation.php.
References Guzzle\Service\Description\OperationInterface\TYPE_CLASS, Guzzle\Service\Description\OperationInterface\TYPE_MODEL, and Guzzle\Service\Description\OperationInterface\TYPE_PRIMITIVE.
Referenced by Guzzle\Service\Description\Operation\__construct(), and Guzzle\Service\Description\Operation\setResponseClass().
Guzzle\Service\Description\Operation::removeParam | ( | $name | ) |
Remove a parameter from the command
string | $name | Name of the parameter to remove |
Definition at line 271 of file Operation.php.
References Guzzle\Service\Description\Operation\$name.
Guzzle\Service\Description\Operation::setAdditionalParameters | ( | $parameter | ) |
Set the additionalParameters of the operation
Definition at line 572 of file Operation.php.
Guzzle\Service\Description\Operation::setClass | ( | $className | ) |
Set the concrete class of the command
string | $className | Concrete class name |
Definition at line 309 of file Operation.php.
Guzzle\Service\Description\Operation::setData | ( | $name, | |
$value | |||
) |
Set a particular data point on the operation
string | $name | Name of the data value |
mixed | $value | Value to set |
Definition at line 548 of file Operation.php.
References Guzzle\Service\Description\Operation\$name.
Guzzle\Service\Description\Operation::setDeprecated | ( | $isDeprecated | ) |
Set whether or not the command is deprecated
bool | $isDeprecated | Set to true to mark as deprecated |
Definition at line 474 of file Operation.php.
Guzzle\Service\Description\Operation::setDocumentationUrl | ( | $docUrl | ) |
Set the URL pointing to additional documentation on the command
string | $docUrl | Documentation URL |
Definition at line 385 of file Operation.php.
Guzzle\Service\Description\Operation::setErrorResponses | ( | array | $errorResponses | ) |
Set all of the error responses of the operation
array | $errorResponses | Hash of error name to a hash containing a code, reason, class |
Definition at line 528 of file Operation.php.
References Guzzle\Service\Description\Operation\$errorResponses.
Guzzle\Service\Description\Operation::setHttpMethod | ( | $httpMethod | ) |
Set the HTTP method of the command
string | $httpMethod | Method to set |
Definition at line 290 of file Operation.php.
References Guzzle\Service\Description\Operation\$httpMethod.
Guzzle\Service\Description\Operation::setName | ( | $name | ) |
Set the name of the command
string | $name | Name of the command |
Definition at line 328 of file Operation.php.
References Guzzle\Service\Description\Operation\$name.
Guzzle\Service\Description\Operation::setNotes | ( | $notes | ) |
Set a longer text field to explain the behavior of the operation.
string | $notes | Notes on the operation |
Definition at line 366 of file Operation.php.
References Guzzle\Service\Description\Operation\$notes.
Guzzle\Service\Description\Operation::setResponseClass | ( | $responseClass | ) |
Set what is returned from the method. Can be a primitive, class name, or model. For example: 'array', 'Guzzle\Foo\Baz', or 'MyModelName' (to reference a model by ID).
string | $responseClass | Type of response |
Definition at line 405 of file Operation.php.
References Guzzle\Service\Description\Operation\$responseClass, and Guzzle\Service\Description\Operation\inferResponseType().
Guzzle\Service\Description\Operation::setResponseNotes | ( | $notes | ) |
Set notes about the response of the operation
string | $notes | Response notes |
Definition at line 455 of file Operation.php.
References Guzzle\Service\Description\Operation\$notes.
Guzzle\Service\Description\Operation::setResponseType | ( | $responseType | ) |
Set qualifying information about the responseClass. One of 'primitive', 'class', 'model', or 'documentation'
string | $responseType | Response type information |
InvalidArgumentException |
Definition at line 426 of file Operation.php.
References Guzzle\Service\Description\Operation\$responseType.
Referenced by Guzzle\Service\Description\Operation\__construct().
Guzzle\Service\Description\Operation::setServiceDescription | ( | ServiceDescriptionInterface | $description | ) |
Set the service description that the operation belongs to
ServiceDescriptionInterface | $description | Service description |
Implements Guzzle\Service\Description\OperationInterface.
Definition at line 222 of file Operation.php.
References Guzzle\Service\Description\Operation\$description.
Guzzle\Service\Description\Operation::setSummary | ( | $summary | ) |
Set a short summary of what the operation does
string | $summary | Short summary of the operation |
Definition at line 347 of file Operation.php.
References Guzzle\Service\Description\Operation\$summary.
Guzzle\Service\Description\Operation::setUri | ( | $uri | ) |
Set the URI template of the command
string | $uri | URI template to set |
Definition at line 493 of file Operation.php.
References Guzzle\Service\Description\Operation\$uri.
Guzzle\Service\Description\Operation::toArray | ( | ) |
Get the array representation of an object
Implements Guzzle\Common\ToArrayInterface.
Definition at line 193 of file Operation.php.
|
protected |
Additional parameters schema
Definition at line 33 of file Operation.php.
Referenced by Guzzle\Service\Description\Operation\getAdditionalParameters().
|
protected |
Class of the command object
Definition at line 75 of file Operation.php.
Referenced by Guzzle\Service\Description\Operation\addErrorResponse(), and Guzzle\Service\Description\Operation\getClass().
|
protected |
Extra operation information
Definition at line 117 of file Operation.php.
|
protected |
Whether or not the command is deprecated
Definition at line 99 of file Operation.php.
Referenced by Guzzle\Service\Description\Operation\getDeprecated().
|
protected |
Definition at line 111 of file Operation.php.
Referenced by Guzzle\Service\Description\Operation\__construct(), Guzzle\Service\Description\Operation\getServiceDescription(), and Guzzle\Service\Description\Operation\setServiceDescription().
|
protected |
Reference URL providing more information about the operation
Definition at line 63 of file Operation.php.
Referenced by Guzzle\Service\Description\Operation\getDocumentationUrl().
|
protected |
Array of errors that could occur when running the command
Definition at line 105 of file Operation.php.
Referenced by Guzzle\Service\Description\Operation\getErrorResponses(), and Guzzle\Service\Description\Operation\setErrorResponses().
|
protected |
HTTP method
Definition at line 45 of file Operation.php.
Referenced by Guzzle\Service\Description\Operation\getHttpMethod(), and Guzzle\Service\Description\Operation\setHttpMethod().
|
protected |
Name of the command
Definition at line 39 of file Operation.php.
Referenced by Guzzle\Service\Description\Operation\__construct(), Guzzle\Service\Description\Operation\getData(), Guzzle\Service\Description\Operation\getName(), Guzzle\Service\Description\Operation\hasParam(), Guzzle\Service\Description\Operation\removeParam(), Guzzle\Service\Description\Operation\setData(), and Guzzle\Service\Description\Operation\setName().
|
protected |
A longer text field to explain the behavior of the operation.
Definition at line 57 of file Operation.php.
Referenced by Guzzle\Service\Description\Operation\getNotes(), Guzzle\Service\Description\Operation\setNotes(), and Guzzle\Service\Description\Operation\setResponseNotes().
|
protected |
Definition at line 27 of file Operation.php.
Referenced by Guzzle\Service\Description\Operation\getParams().
|
staticprotected |
Definition at line 17 of file Operation.php.
|
protected |
This is what is returned from the method
Definition at line 81 of file Operation.php.
Referenced by Guzzle\Service\Description\Operation\getResponseClass(), and Guzzle\Service\Description\Operation\setResponseClass().
|
protected |
Information about the response returned by the operation
Definition at line 93 of file Operation.php.
Referenced by Guzzle\Service\Description\Operation\getResponseNotes().
|
protected |
Type information about the response
Definition at line 87 of file Operation.php.
Referenced by Guzzle\Service\Description\Operation\getResponseType(), and Guzzle\Service\Description\Operation\setResponseType().
|
protected |
This is a short summary of what the operation does
Definition at line 51 of file Operation.php.
Referenced by Guzzle\Service\Description\Operation\getSummary(), and Guzzle\Service\Description\Operation\setSummary().
|
protected |
HTTP URI of the command
Definition at line 69 of file Operation.php.
Referenced by Guzzle\Service\Description\Operation\getUri(), and Guzzle\Service\Description\Operation\setUri().
const Guzzle\Service\Description\Operation::DEFAULT_COMMAND_CLASS = 'Guzzle\\Service\\Command\\OperationCommand' |
Default command class to use when none is specified
Definition at line 14 of file Operation.php.