package Default
inherited_from \Zend\Json\Server\Request

 Methods

Constructor

__construct() 

Pull JSON request from raw POST body and use to populate request.

Cast request to string (JSON)

__toString() : string
Inherited

Returns

string

Add a parameter to the request

addParam(mixed $value, string $key = null) : \Zend\Json\Server\Request
Inherited

Parameters

$value

mixed

$key

string

Returns

\Zend\Json\Server\Request

Add many params

addParams(array $params) : \Zend\Json\Server\Request
Inherited

Parameters

$params

array

Returns

\Zend\Json\Server\Request

Retrieve request identifier

getId() : mixed
Inherited

Returns

mixed

Get request method name

getMethod() : string
Inherited

Returns

string

Retrieve param by index or key

getParam(integer|string $index) : mixed | null
Inherited

Parameters

$index

integerstring

Returns

mixednullNull when not found

Retrieve parameters

getParams() : array
Inherited

Returns

array

Get JSON from raw POST body

getRawJson() : string

Returns

string

Retrieve JSON-RPC version

getVersion() : string
Inherited

Returns

string

Was a bad method provided?

isMethodError() : boolean
Inherited

Returns

boolean

Was a malformed JSON provided?

isParseError() : boolean
Inherited

Returns

boolean

Set request state based on JSON

loadJson(string $json) : void
Inherited

Parameters

$json

string

Set request identifier

setId(mixed $name) : \Zend\Json\Server\Request
Inherited

Parameters

$name

mixed

Returns

\Zend\Json\Server\Request

Set request method

setMethod(string $name) : \Zend\Json\Server\Request
Inherited

Parameters

$name

string

Returns

\Zend\Json\Server\Request

Set request state

setOptions(array $options) : \Zend\Json\Server\Request
Inherited

Parameters

$options

array

Returns

\Zend\Json\Server\Request

Overwrite params

setParams(array $params) : \Zend\Json\Server\Request
Inherited

Parameters

$params

array

Returns

\Zend\Json\Server\Request

Set JSON-RPC version

setVersion(string $version) : \Zend\Json\Server\Request
Inherited

Parameters

$version

string

Returns

\Zend\Json\Server\Request

Cast request to JSON

toJson() : string
Inherited

Returns

string

 Properties

 

Request ID

$id : mixed

Default

 

Flag

$isMethodError : boolean

Default

false
 

Flag

$isParseError : boolean

Default

false
 

Requested method

$method : string

Default

 

Regex for method

$methodRegex : string

Default

'/^[a-z][a-z0-9\\\\_.]*$/i'
 

Request parameters

$params : array

Default

array()
 

Raw JSON pulled from POST body

$rawJson : string

Default

 

JSON-RPC version of request

$version : string

Default

'1.0'