todo Revised method regex to allow NS; however, should SMD be revised to strip PHP NS instead when attaching functions?
category Zend
package Zend_Json
subpackage Server

 Methods

Cast request to string (JSON)

__toString() : string

Returns

string

Add a parameter to the request

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

Parameters

$value

mixed

$key

string

Returns

Add many params

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

Parameters

$params

array

Returns

Retrieve request identifier

getId() : mixed

Returns

mixed

Get request method name

getMethod() : string

Returns

string

Retrieve param by index or key

getParam(int | string $index) : mixed | null

Parameters

$index

intstring

Returns

mixednullNull when not found

Retrieve parameters

getParams() : array

Returns

array

Retrieve JSON-RPC version

getVersion() : string

Returns

string

Was a bad method provided?

isMethodError() : bool

Returns

bool

Set request state based on JSON

loadJson(string $json) : void

Parameters

$json

string

Set request identifier

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

Parameters

$name

mixed

Returns

Set request method

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

Parameters

$name

string

Returns

Set request state

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

Parameters

$options

array

Returns

Overwrite params

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

Parameters

$params

array

Returns

Set JSON-RPC version

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

Parameters

$version

string

Returns

Cast request to JSON

toJson() : string

Returns

string

 Properties

 

Request ID

$id : mixed

 

Flag

$isMethodError : bool

 

Requested method

$method : string

 

Regex for method

$methodRegex : string

 

Request parameters

$params : array

 

JSON-RPC version of request

$version : string