package Default
inherited_from \Zend\Json\Server\Response

 Methods

Cast to string (JSON)

__toString() : string
Inherited

Returns

string

Retrieve args

getArgs() : mixed
Inherited

Returns

mixed

Get response error

getError() : null | \Zend\Json\Server\Error
Inherited

Returns

null\Zend\Json\Server\Error

Get request ID

getId() : mixed
Inherited

Returns

mixed

Get result

getResult() : mixed
Inherited

Returns

mixed

Retrieve service map

getServiceMap() : \Zend\Json\Server\Smd | null
Inherited

Returns

\Zend\Json\Server\Smdnull

Retrieve JSON-RPC version

getVersion() : string
Inherited

Returns

string

Is the response an error?

isError() : boolean
Inherited

Returns

boolean

Set response state based on JSON

loadJson(string $json) : void
Inherited

Parameters

$json

string

Exceptions

\Zend\Json\Server\Exception\RuntimeException

Send headers

sendHeaders() : void

If headers are already sent, do nothing. If null ID, send HTTP 204 header. Otherwise, send content type header based on content type of service map.

Set args

setArgs(mixed $args) : \Zend\Json\Server\Response\Http
Inherited
fluent This method is part of a fluent interface and will return the same instance

Parameters

$args

mixed

Returns

\Zend\Json\Server\Response\Http

Set result error

setError(mixed $error = null) : \Zend\Json\Server\Response
Inherited

Parameters

$error

mixed

Returns

\Zend\Json\Server\Response

Set request ID

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

Parameters

$name

mixed

Returns

\Zend\Json\Server\Response

Set response state

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

Parameters

$options

array

Returns

\Zend\Json\Server\Response

Set result

setResult(mixed $value) : \Zend\Json\Server\Response
Inherited

Parameters

$value

mixed

Returns

\Zend\Json\Server\Response

Set service map object

setServiceMap(\Zend\Json\Server\Smd $serviceMap) : \Zend\Json\Server\Response
Inherited

Parameters

$serviceMap

\Zend\Json\Server\Smd

Returns

\Zend\Json\Server\Response

Set JSON-RPC version

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

Parameters

$version

string

Returns

\Zend\Json\Server\Response

Emit JSON

toJson() : string

Send appropriate HTTP headers. If no Id, then return an empty string.

inherited_from \Zend\Json\Server\Response::toJson()

Returns

string

Cast to JSON

toJson() : string
Inherited

Returns

string

 Properties

 

$args

$args : 

Default

 

Response error

$error : null | \Zend\Json\Server\Error

Default

 

Request ID

$id : mixed

Default

 

Result

$result : mixed

Default

 

Service map

$serviceMap : \Zend\Json\Server\Smd

Default

 

JSON-RPC version

$version : string

Default