package Default

 Methods

Cast to string (JSON)

__toString() : string

Returns

string

Add Service

addService(\Zend\Json\Server\Smd\Service|array $service) : \Zend\Json\Server\Smd

Parameters

$service

\Zend\Json\Server\Smd\Servicearray

Exceptions

\Zend\Json\Server\Exception\RuntimeException
\Zend\Json\Server\Exception\InvalidArgumentException

Returns

\Zend\Json\Server\Smd

Add many services

addServices(array $services) : \Zend\Json\Server\Smd

Parameters

$services

array

Returns

\Zend\Json\Server\Smd

Retrieve content type

getContentType() : string

Returns

string

Get service description

getDescription() : string

Returns

string

Retrieve envelope

getEnvelope() : string

Returns

string

Get service id

getId() : string

Returns

string

Get service object

getService(string $name) : boolean | \Zend\Json\Server\Smd\Service

Parameters

$name

string

Returns

boolean\Zend\Json\Server\Smd\Service

Return services

getServices() : array

Returns

array

Retrieve service target

getTarget() : string

Returns

string

Get transport

getTransport() : string

Returns

string

Is this a Dojo compatible SMD?

isDojoCompatible() : boolean

Returns

boolean

Remove service

removeService(string $name) : boolean

Parameters

$name

string

Returns

boolean

Set content type

setContentType(string $type) : \Zend\Json\Server\Smd

Parameters

$type

string

Exceptions

\Zend\Json\Server\Exception\InvalidArgumentException

Returns

\Zend\Json\Server\Smd

Set service description

setDescription(string $description) : \Zend\Json\Server\Smd

Parameters

$description

string

Returns

\Zend\Json\Server\Smd

Indicate whether or not to generate Dojo-compatible SMD

setDojoCompatible(boolean $flag) : \Zend\Json\Server\Smd

Parameters

$flag

boolean

Returns

\Zend\Json\Server\Smd

Set envelope

setEnvelope(string $envelopeType) : \Zend\Json\Server\Smd

Parameters

$envelopeType

string

Exceptions

\Zend\Json\Server\Exception\InvalidArgumentException

Returns

\Zend\Json\Server\Smd

Set service ID

setId(string $id) : \Zend\Json\Server\Smd

Parameters

$id

string

Returns

\Zend\Json\Server\Smd

Set object state via options

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

Parameters

$options

array

Returns

\Zend\Json\Server\Smd

Overwrite existing services with new ones

setServices(array $services) : \Zend\Json\Server\Smd

Parameters

$services

array

Returns

\Zend\Json\Server\Smd

Set service target

setTarget(string $target) : \Zend\Json\Server\Smd

Parameters

$target

string

Returns

\Zend\Json\Server\Smd

Set transport

setTransport(string $transport) : \Zend\Json\Server\Smd

Parameters

$transport

string

Exceptions

\Zend\Json\Server\Exception\InvalidArgumentException

Returns

\Zend\Json\Server\Smd

Cast to array

toArray() : array

Returns

array

Export to DOJO-compatible SMD array

toDojoArray() : array

Returns

array

Cast to JSON

toJson() : string

Returns

string

 Properties

 

Content type

$contentType : string

Default

'application/json'
 

Content type regex

$contentTypeRegex : string

Default

'#[a-z]+/[a-z][a-z-]+#i'
 

Service description

$description : string

Default

 

Generate Dojo-compatible SMD

$dojoCompatible : boolean

Default

false
 

Current envelope

$envelope : string

Default

self::ENV_JSONRPC_1
 

Allowed envelope types

$envelopeTypes : array

Default

array(self::ENV_JSONRPC_1, self::ENV_JSONRPC_2)
 

Service id

$id : string

Default

 

Services offered

$services : array

Default

array()
 

Service target

$target : string

Default

 

Global transport

$transport : string

Default

'POST'
 

Allowed transport types

$transportTypes : array

Default

array('POST')

 Constants

 

ENV_JSONRPC_1

ENV_JSONRPC_1 = 'JSON-RPC-1.0' 
 

ENV_JSONRPC_2

ENV_JSONRPC_2 = 'JSON-RPC-2.0' 
 

SMD_VERSION

SMD_VERSION = '2.0'