Methods
Constructor
__construct()
Pull JSON request from raw POST body and use to populate request.
Cast request to string (JSON)
__toString() : string
Inherited
inherited_from |
\Zend\Json\Server\Request::__toString() |
Returns
string
Add a parameter to the request
addParam(mixed $value, string $key) : \Zend\Json\Server\Request
Inherited
inherited_from |
\Zend\Json\Server\Request::addParam() |
Parameters
$value
mixed
$key
string
Returns
Add many params
addParams(array $params) : \Zend\Json\Server\Request
Inherited
inherited_from |
\Zend\Json\Server\Request::addParams() |
Parameters
$params
array
Returns
Retrieve request identifier
getId() : mixed
Inherited
inherited_from |
\Zend\Json\Server\Request::getId() |
Returns
mixed
Get request method name
getMethod() : string
Inherited
inherited_from |
\Zend\Json\Server\Request::getMethod() |
Returns
string
Retrieve param by index or key
getParam(int | string $index) : mixed | null
Inherited
inherited_from |
\Zend\Json\Server\Request::getParam() |
Parameters
$index
intstring
Returns
mixed
null
Null when not found
Retrieve parameters
getParams() : array
Inherited
inherited_from |
\Zend\Json\Server\Request::getParams() |
Returns
array
Get JSON from raw POST body
getRawJson() : string
Retrieve JSON-RPC version
getVersion() : string
Inherited
inherited_from |
\Zend\Json\Server\Request::getVersion() |
Returns
string
Was a bad method provided?
isMethodError() : bool
Inherited
inherited_from |
\Zend\Json\Server\Request::isMethodError() |
Returns
bool
Was a malformed JSON provided?
isParseError() : bool
Inherited
inherited_from |
\Zend\Json\Server\Request::isParseError() |
Returns
bool
Set request state based on JSON
loadJson(string $json) : void
Inherited
inherited_from |
\Zend\Json\Server\Request::loadJson() |
Parameters
$json
string
Set request identifier
setId(mixed $name) : \Zend\Json\Server\Request
Inherited
inherited_from |
\Zend\Json\Server\Request::setId() |
Parameters
$name
mixed
Returns
Set request method
setMethod(string $name) : \Zend\Json\Server\Request
Inherited
inherited_from |
\Zend\Json\Server\Request::setMethod() |
Parameters
$name
string
Returns
Set request state
setOptions(array $options) : \Zend\Json\Server\Request
Inherited
inherited_from |
\Zend\Json\Server\Request::setOptions() |
Parameters
$options
array
Returns
Overwrite params
setParams(array $params) : \Zend\Json\Server\Request
Inherited
inherited_from |
\Zend\Json\Server\Request::setParams() |
Parameters
$params
array
Returns
Set JSON-RPC version
setVersion(string $version) : \Zend\Json\Server\Request
Inherited
inherited_from |
\Zend\Json\Server\Request::setVersion() |
Parameters
$version
string
Returns
Cast request to JSON
toJson() : string
Inherited
inherited_from |
\Zend\Json\Server\Request::toJson() |
Returns
string
Properties
Request ID
$id : mixed
Inherited
inherited_from |
\Zend\Json\Server\Request::$$id |
Flag
$isMethodError : bool
Inherited
inherited_from |
\Zend\Json\Server\Request::$$isMethodError |
Flag
$isParseError : bool
Inherited
inherited_from |
\Zend\Json\Server\Request::$$isParseError |
Requested method
$method : string
Inherited
inherited_from |
\Zend\Json\Server\Request::$$method |
Regex for method
$methodRegex : string
Inherited
inherited_from |
\Zend\Json\Server\Request::$$methodRegex |
Request parameters
$params : array
Inherited
inherited_from |
\Zend\Json\Server\Request::$$params |
Raw JSON pulled from POST body
$rawJson : string
JSON-RPC version of request
$version : string
Inherited
inherited_from |
\Zend\Json\Server\Request::$$version |