OperationInterface
extends
ToArrayInterface
in
Interface defining data objects that hold the information of an API operation
Table of Contents
Constants
- TYPE_CLASS = 'class'
- TYPE_DOCUMENTATION = 'documentation'
- TYPE_MODEL = 'model'
- TYPE_PRIMITIVE = 'primitive'
Methods
- getClass() : string
- Get the concrete operation class that implements this operation
- getData() : mixed|null
- Get extra data from the operation
- getDeprecated() : bool
- Get whether or not the operation is deprecated
- getDocumentationUrl() : string|null
- Get the documentation URL of the operation
- getErrorResponses() : array<string|int, mixed>
- Get the errors that could be encountered when executing the operation
- getHttpMethod() : string|null
- Get the HTTP method of the operation
- getName() : string|null
- Get the name of the operation
- getNotes() : string|null
- Get a longer text field to explain the behavior of the operation
- getParam() : Parameter|null
- Get a single parameter of the operation
- getParamNames() : array<string|int, mixed>
- Returns an array of parameter names
- getParams() : array<string|int, mixed>
- Get the params of the operation
- getResponseClass() : string|null
- 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'.
- getResponseNotes() : string|null
- Get notes about the response of the operation
- getResponseType() : string
- Get information about how the response is unmarshalled: One of 'primitive', 'class', 'model', or 'documentation'
- getServiceDescription() : ServiceDescriptionInterface|null
- Get the service description that the operation belongs to
- getSummary() : string|null
- Get a short summary of what the operation does
- getUri() : string
- Get the URI that will be merged into the generated request
- hasParam() : bool
- Check if the operation has a specific parameter by name
- setServiceDescription() : self
- Set the service description that the operation belongs to
- toArray() : array<string|int, mixed>
- Get the array representation of an object
Constants
TYPE_CLASS
public
mixed
TYPE_CLASS
= 'class'
TYPE_DOCUMENTATION
public
mixed
TYPE_DOCUMENTATION
= 'documentation'
TYPE_MODEL
public
mixed
TYPE_MODEL
= 'model'
TYPE_PRIMITIVE
public
mixed
TYPE_PRIMITIVE
= 'primitive'
Methods
getClass()
Get the concrete operation class that implements this operation
public
getClass() : string
Return values
stringgetData()
Get extra data from the operation
public
getData(string $name) : mixed|null
Parameters
- $name : string
-
Name of the data point to retrieve
Return values
mixed|nullgetDeprecated()
Get whether or not the operation is deprecated
public
getDeprecated() : bool
Return values
boolgetDocumentationUrl()
Get the documentation URL of the operation
public
getDocumentationUrl() : string|null
Return values
string|nullgetErrorResponses()
Get the errors that could be encountered when executing the operation
public
getErrorResponses() : array<string|int, mixed>
Return values
array<string|int, mixed>getHttpMethod()
Get the HTTP method of the operation
public
getHttpMethod() : string|null
Return values
string|nullgetName()
Get the name of the operation
public
getName() : string|null
Return values
string|nullgetNotes()
Get a longer text field to explain the behavior of the operation
public
getNotes() : string|null
Return values
string|nullgetParam()
Get a single parameter of the operation
public
getParam(string $param) : Parameter|null
Parameters
- $param : string
-
Parameter to retrieve by name
Return values
Parameter|nullgetParamNames()
Returns an array of parameter names
public
getParamNames() : array<string|int, mixed>
Return values
array<string|int, mixed>getParams()
Get the params of the operation
public
getParams() : array<string|int, mixed>
Return values
array<string|int, mixed>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'.
public
getResponseClass() : string|null
Return values
string|nullgetResponseNotes()
Get notes about the response of the operation
public
getResponseNotes() : string|null
Return values
string|nullgetResponseType()
Get information about how the response is unmarshalled: One of 'primitive', 'class', 'model', or 'documentation'
public
getResponseType() : string
Return values
stringgetServiceDescription()
Get the service description that the operation belongs to
public
getServiceDescription() : ServiceDescriptionInterface|null
Return values
ServiceDescriptionInterface|nullgetSummary()
Get a short summary of what the operation does
public
getSummary() : string|null
Return values
string|nullgetUri()
Get the URI that will be merged into the generated request
public
getUri() : string
Return values
stringhasParam()
Check if the operation has a specific parameter by name
public
hasParam(string $name) : bool
Parameters
- $name : string
-
Name of the param
Return values
boolsetServiceDescription()
Set the service description that the operation belongs to
public
setServiceDescription(ServiceDescriptionInterface $description) : self
Parameters
- $description : ServiceDescriptionInterface
-
Service description
Return values
selftoArray()
Get the array representation of an object
public
toArray() : array<string|int, mixed>