Overview

Namespaces

  • Contrib
    • Bundle
      • CoverallsBundle
        • Console
        • Entity
      • CoverallsV1Bundle
        • Api
        • Collector
        • Command
        • Config
        • Entity
          • Git
    • Component
      • File
      • Log
      • System
        • Git
  • Guzzle
    • Batch
      • Exception
    • Cache
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
      • QueryAggregator
    • Inflection
    • Iterator
    • Log
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Async
      • Backoff
      • Cache
      • Cookie
        • CookieJar
        • Exception
      • CurlAuth
      • ErrorResponse
        • Exception
      • History
      • Log
      • Md5
      • Mock
      • Oauth
    • Service
      • Builder
      • Command
        • Factory
        • LocationVisitor
          • Request
          • Response
      • Description
      • Exception
      • Resource
    • Stream
  • PHP
  • Psr
    • Log
  • Symfony
    • Component
      • Config
        • Definition
          • Builder
          • Exception
        • Exception
        • Loader
        • Resource
        • Util
      • Console
        • Command
        • Formatter
        • Helper
        • Input
        • Output
        • Tester
      • EventDispatcher
        • Debug
      • Finder
        • Adapter
        • Comparator
        • Exception
        • Expression
        • Iterator
        • Shell
      • Stopwatch
      • Yaml
        • Exception

Classes

  • Operation
  • Parameter
  • SchemaFormatter
  • SchemaValidator
  • ServiceDescription
  • ServiceDescriptionLoader

Interfaces

  • OperationInterface
  • ServiceDescriptionInterface
  • ValidatorInterface
  • Overview
  • Namespace
  • Class
  • Tree
  • Todo

Class Operation

Data object holding the information of an API command

Guzzle\Service\Description\Operation implements Guzzle\Service\Description\OperationInterface
Namespace: Guzzle\Service\Description
Located at Guzzle/Service/Description/Operation.php
Methods summary
public
# __construct( array $config = array(), Guzzle\Service\Description\ServiceDescriptionInterface $description = null )

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
  • class: (string) Concrete class that implements this command
  • parameters: (array) Associative array of parameters for the command. Guzzle\Service\Description\Parameter for information.
  • summary: (string) This is a short summary of what the operation does
  • notes: (string) A longer text field to explain the behavior of the operation.
  • documentationUrl: (string) Reference URL providing more information about the operation
  • responseClass: (string) This is what is returned from the method. Can be a primitive, PSR-0 compliant

    class name, or model.

  • responseNotes: (string) Information about the response returned by the operation
  • responseType: (string) One of 'primitive', 'class', 'model', or 'documentation'. If not specified, this

    value will be automatically inferred based on whether or not there is a model matching the

    name, if a matching PSR-0 compliant class name is found, or set to 'primitive' by default.

  • 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

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
  • class: (string) Concrete class that implements this command
  • parameters: (array) Associative array of parameters for the command. Guzzle\Service\Description\Parameter for information.
  • summary: (string) This is a short summary of what the operation does
  • notes: (string) A longer text field to explain the behavior of the operation.
  • documentationUrl: (string) Reference URL providing more information about the operation
  • responseClass: (string) This is what is returned from the method. Can be a primitive, PSR-0 compliant class name, or model.
  • responseNotes: (string) Information about the response returned by the operation
  • responseType: (string) One of 'primitive', 'class', 'model', or 'documentation'. If not specified, this value will be automatically inferred based on whether or not there is a model matching the name, if a matching PSR-0 compliant class name is found, or set to 'primitive' by default.
  • 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

$config
array
$config Array of configuration data
$description
Guzzle\Service\Description\ServiceDescriptionInterface
$description Service description used to resolve models if $ref tags are found
public array
# toArray( )

Get the array representation of an object

Get the array representation of an object

Returns

array

Implementation of

Guzzle\Common\ToArrayInterface::toArray()
public Guzzle\Service\Description\ServiceDescriptionInterface|null
# getServiceDescription( )

Get the service description that the operation belongs to

Get the service description that the operation belongs to

Returns

Guzzle\Service\Description\ServiceDescriptionInterface|null

Implementation of

Guzzle\Service\Description\OperationInterface::getServiceDescription()
public Guzzle\Service\Description\Operation
# setServiceDescription( Guzzle\Service\Description\ServiceDescriptionInterface $description )

Set the service description that the operation belongs to

Set the service description that the operation belongs to

Parameters

$description
Guzzle\Service\Description\ServiceDescriptionInterface
$description Service description

Returns

Guzzle\Service\Description\Operation

Implementation of

Guzzle\Service\Description\OperationInterface::setServiceDescription()
public array
# getParams( )

Get the params of the operation

Get the params of the operation

Returns

array

Implementation of

Guzzle\Service\Description\OperationInterface::getParams()
public array
# getParamNames( )

Returns an array of parameter names

Returns an array of parameter names

Returns

array

Implementation of

Guzzle\Service\Description\OperationInterface::getParamNames()
public boolean
# hasParam( string $name )

Check if the operation has a specific parameter by name

Check if the operation has a specific parameter by name

Parameters

$name
string
$name Name of the param

Returns

boolean

Implementation of

Guzzle\Service\Description\OperationInterface::hasParam()
public Guzzle\Service\Description\Parameter|null
# getParam( string $param )

Get a single parameter of the operation

Get a single parameter of the operation

Parameters

$param
string
$param Parameter to retrieve by name

Returns

Guzzle\Service\Description\Parameter|null

Implementation of

Guzzle\Service\Description\OperationInterface::getParam()
public Guzzle\Service\Description\Operation
# addParam( Guzzle\Service\Description\Parameter $param )

Add a parameter to the command

Add a parameter to the command

Parameters

$param
Guzzle\Service\Description\Parameter
$param Parameter to add

Returns

Guzzle\Service\Description\Operation
public Guzzle\Service\Description\Operation
# removeParam( string $name )

Remove a parameter from the command

Remove a parameter from the command

Parameters

$name
string
$name Name of the parameter to remove

Returns

Guzzle\Service\Description\Operation
public string|null
# getHttpMethod( )

Get the HTTP method of the operation

Get the HTTP method of the operation

Returns

string|null

Implementation of

Guzzle\Service\Description\OperationInterface::getHttpMethod()
public Guzzle\Service\Description\Operation
# setHttpMethod( string $httpMethod )

Set the HTTP method of the command

Set the HTTP method of the command

Parameters

$httpMethod
string
$httpMethod Method to set

Returns

Guzzle\Service\Description\Operation
public string
# getClass( )

Get the concrete operation class that implements this operation

Get the concrete operation class that implements this operation

Returns

string

Implementation of

Guzzle\Service\Description\OperationInterface::getClass()
public Guzzle\Service\Description\Operation
# setClass( string $className )

Set the concrete class of the command

Set the concrete class of the command

Parameters

$className
string
$className Concrete class name

Returns

Guzzle\Service\Description\Operation
public string|null
# getName( )

Get the name of the operation

Get the name of the operation

Returns

string|null

Implementation of

Guzzle\Service\Description\OperationInterface::getName()
public Guzzle\Service\Description\Operation
# setName( string $name )

Set the name of the command

Set the name of the command

Parameters

$name
string
$name Name of the command

Returns

Guzzle\Service\Description\Operation
public string|null
# getSummary( )

Get a short summary of what the operation does

Get a short summary of what the operation does

Returns

string|null

Implementation of

Guzzle\Service\Description\OperationInterface::getSummary()
public Guzzle\Service\Description\Operation
# setSummary( string $summary )

Set a short summary of what the operation does

Set a short summary of what the operation does

Parameters

$summary
string
$summary Short summary of the operation

Returns

Guzzle\Service\Description\Operation
public string|null
# getNotes( )

Get a longer text field to explain the behavior of the operation

Get a longer text field to explain the behavior of the operation

Returns

string|null

Implementation of

Guzzle\Service\Description\OperationInterface::getNotes()
public Guzzle\Service\Description\Operation
# setNotes( string $notes )

Set a longer text field to explain the behavior of the operation.

Set a longer text field to explain the behavior of the operation.

Parameters

$notes
string
$notes Notes on the operation

Returns

Guzzle\Service\Description\Operation
public string|null
# getDocumentationUrl( )

Get the documentation URL of the operation

Get the documentation URL of the operation

Returns

string|null

Implementation of

Guzzle\Service\Description\OperationInterface::getDocumentationUrl()
public Guzzle\Service\Description\Operation
# setDocumentationUrl( string $docUrl )

Set the URL pointing to additional documentation on the command

Set the URL pointing to additional documentation on the command

Parameters

$docUrl
string
$docUrl Documentation URL

Returns

Guzzle\Service\Description\Operation
public string|null
# 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'.

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'.

Returns

string|null

Implementation of

Guzzle\Service\Description\OperationInterface::getResponseClass()
public Guzzle\Service\Description\Operation
# setResponseClass( string $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).

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).

Parameters

$responseClass
string
$responseClass Type of response

Returns

Guzzle\Service\Description\Operation
public string
# getResponseType( )

Get information about how the response is unmarshalled: One of 'primitive', 'class', 'model', or 'documentation'

Get information about how the response is unmarshalled: One of 'primitive', 'class', 'model', or 'documentation'

Returns

string

Implementation of

Guzzle\Service\Description\OperationInterface::getResponseType()
public Guzzle\Service\Description\Operation
# setResponseType( string $responseType )

Set qualifying information about the responseClass. One of 'primitive', 'class', 'model', or 'documentation'

Set qualifying information about the responseClass. One of 'primitive', 'class', 'model', or 'documentation'

Parameters

$responseType
string
$responseType Response type information

Returns

Guzzle\Service\Description\Operation

Throws

Guzzle\Common\Exception\InvalidArgumentException
public string|null
# getResponseNotes( )

Get notes about the response of the operation

Get notes about the response of the operation

Returns

string|null

Implementation of

Guzzle\Service\Description\OperationInterface::getResponseNotes()
public Guzzle\Service\Description\Operation
# setResponseNotes( string $notes )

Set notes about the response of the operation

Set notes about the response of the operation

Parameters

$notes
string
$notes Response notes

Returns

Guzzle\Service\Description\Operation
public boolean
# getDeprecated( )

Get whether or not the operation is deprecated

Get whether or not the operation is deprecated

Returns

boolean

Implementation of

Guzzle\Service\Description\OperationInterface::getDeprecated()
public Guzzle\Service\Description\Operation
# setDeprecated( boolean $isDeprecated )

Set whether or not the command is deprecated

Set whether or not the command is deprecated

Parameters

$isDeprecated
boolean
$isDeprecated Set to true to mark as deprecated

Returns

Guzzle\Service\Description\Operation
public string
# getUri( )

Get the URI that will be merged into the generated request

Get the URI that will be merged into the generated request

Returns

string

Implementation of

Guzzle\Service\Description\OperationInterface::getUri()
public Guzzle\Service\Description\Operation
# setUri( string $uri )

Set the URI template of the command

Set the URI template of the command

Parameters

$uri
string
$uri URI template to set

Returns

Guzzle\Service\Description\Operation
public array
# getErrorResponses( )

Get the errors that could be encountered when executing the operation

Get the errors that could be encountered when executing the operation

Returns

array

Implementation of

Guzzle\Service\Description\OperationInterface::getErrorResponses()
public Guzzle\Service\Description\Operation
# addErrorResponse( string $code, string $reason, string $class )

Add an error to the command

Add an error to the command

Parameters

$code
string
$code HTTP response code
$reason
string
$reason HTTP response reason phrase or information about the error
$class
string
$class Exception class associated with the error

Returns

Guzzle\Service\Description\Operation
public Guzzle\Service\Description\Operation
# setErrorResponses( array $errorResponses )

Set all of the error responses of the operation

Set all of the error responses of the operation

Parameters

$errorResponses
array
$errorResponses Hash of error name to a hash containing a code, reason, class

Returns

Guzzle\Service\Description\Operation
public mixed|null
# getData( string $name )

Get extra data from the operation

Get extra data from the operation

Parameters

$name
string
$name Name of the data point to retrieve

Returns

mixed|null

Implementation of

Guzzle\Service\Description\OperationInterface::getData()
public Guzzle\Service\Description\Operation
# setData( string $name, mixed $value )

Set a particular data point on the operation

Set a particular data point on the operation

Parameters

$name
string
$name Name of the data value
$value
mixed
$value Value to set

Returns

Guzzle\Service\Description\Operation
public Paramter|null
# getAdditionalParameters( )

Get the additionalParameters of the operation

Get the additionalParameters of the operation

Returns

Paramter|null
public Guzzle\Service\Description\Operation
# setAdditionalParameters( Guzzle\Service\Description\Parameter|null $parameter )

Set the additionalParameters of the operation

Set the additionalParameters of the operation

Parameters

$parameter
Guzzle\Service\Description\Parameter|null
$parameter Parameter to set

Returns

Guzzle\Service\Description\Operation
protected
# inferResponseType( )

Infer the response type from the responseClass value

Infer the response type from the responseClass value

Constants summary
string DEFAULT_COMMAND_CLASS 'Guzzle\\Service\\Command\\OperationCommand'
#

Default command class to use when none is specified

Default command class to use when none is specified

Constants inherited from Guzzle\Service\Description\OperationInterface
TYPE_CLASS, TYPE_DOCUMENTATION, TYPE_MODEL, TYPE_PRIMITIVE
Properties summary
protected static array $properties array( 'name' => true, 'httpMethod' => true, 'uri' => true, 'class' => true, 'responseClass' => true, 'responseType' => true, 'responseNotes' => true, 'notes' => true, 'summary' => true, 'documentationUrl' => true, 'deprecated' => true, 'data' => true, 'parameters' => true, 'additionalParameters' => true, 'errorResponses' => true )
#

Hashmap of properties that can be specified. Represented as a hash to speed up constructor.

Hashmap of properties that can be specified. Represented as a hash to speed up constructor.

protected array $parameters array()
#

Parameters

Parameters

protected Guzzle\Service\Description\Parameter $additionalParameters
#

Additional parameters schema

Additional parameters schema

protected string $name
#

Name of the command

Name of the command

protected string $httpMethod
#

HTTP method

HTTP method

protected string $summary
#

This is a short summary of what the operation does

This is a short summary of what the operation does

protected string $notes
#

A longer text field to explain the behavior of the operation.

A longer text field to explain the behavior of the operation.

protected string $documentationUrl
#

Reference URL providing more information about the operation

Reference URL providing more information about the operation

protected string $uri
#

HTTP URI of the command

HTTP URI of the command

protected string $class
#

Class of the command object

Class of the command object

protected string $responseClass
#

This is what is returned from the method

This is what is returned from the method

protected string $responseType
#

Type information about the response

Type information about the response

protected string $responseNotes
#

Information about the response returned by the operation

Information about the response returned by the operation

protected boolean $deprecated
#

Whether or not the command is deprecated

Whether or not the command is deprecated

protected array $errorResponses
#

Array of errors that could occur when running the command

Array of errors that could occur when running the command

protected Guzzle\Service\Description\ServiceDescriptionInterface $description
#
protected array $data
#

Extra operation information

Extra operation information

php-coveralls API documentation generated by ApiGen 2.8.0