Public Member Functions | Data Fields | Protected Attributes

Zend_Json_Server_Smd Class Reference

Public Member Functions

 setOptions (array $options)
 setTransport ($transport)
 getTransport ()
 setEnvelope ($envelopeType)
 getEnvelope ()
 setContentType ($type)
 getContentType ()
 setTarget ($target)
 getTarget ()
 setId ($id)
 getId ()
 setDescription ($description)
 getDescription ()
 setDojoCompatible ($flag)
 isDojoCompatible ()
 addService ($service)
 addServices (array $services)
 setServices (array $services)
 getService ($name)
 getServices ()
 removeService ($name)
 toArray ()
 toDojoArray ()
 toJson ()
 __toString ()

Data Fields

const ENV_JSONRPC_1 = 'JSON-RPC-1.0'
const ENV_JSONRPC_2 = 'JSON-RPC-2.0'
const SMD_VERSION = '2.0'

Protected Attributes

 $_contentType = 'application/json'
 $_contentTypeRegex = '#[a-z]+/[a-z][a-z-]+#i'
 $_description
 $_dojoCompatible = false
 $_envelope = self::ENV_JSONRPC_1
 $_envelopeTypes
 $_id
 $_services = array()
 $_target
 $_transport = 'POST'
 $_transportTypes = array('POST')

Detailed Description

Definition at line 30 of file Smd.php.


Member Function Documentation

__toString (  )

Cast to string (JSON)

Returns:
string

Definition at line 475 of file Smd.php.

addService ( service )

Add Service

Parameters:
Zend_Json_Server_Smd_Service | array$service
Returns:
void

Definition at line 296 of file Smd.php.

addServices ( array $  services )

Add many services

Parameters:
array$services
Returns:
Zend_Json_Server_Smd

Definition at line 324 of file Smd.php.

getContentType (  )

Retrieve content type

Returns:
string

Definition at line 197 of file Smd.php.

getDescription (  )

Get service description

Returns:
string

Definition at line 263 of file Smd.php.

getEnvelope (  )

Retrieve envelope

Returns:
string

Definition at line 170 of file Smd.php.

getId (  )

Get service id

Returns:
string

Definition at line 241 of file Smd.php.

getService ( name )

Get service object

Parameters:
string$name
Returns:
false|Zend_Json_Server_Smd_Service

Definition at line 350 of file Smd.php.

getServices (  )

Return services

Returns:
array

Definition at line 363 of file Smd.php.

getTarget (  )

Retrieve service target

Returns:
string

Definition at line 219 of file Smd.php.

getTransport (  )

Get transport

Returns:
string

Definition at line 144 of file Smd.php.

isDojoCompatible (  )

Is this a Dojo compatible SMD?

Returns:
bool

Definition at line 285 of file Smd.php.

removeService ( name )

Remove service

Parameters:
string$name
Returns:
boolean

Definition at line 374 of file Smd.php.

setContentType ( type )

Set content type

Parameters:
string$type
Returns:
Zend_Json_Server_Smd

Definition at line 182 of file Smd.php.

setDescription ( description )

Set service description

Parameters:
string$description
Returns:
Zend_Json_Server_Smd

Definition at line 252 of file Smd.php.

setDojoCompatible ( flag )

Indicate whether or not to generate Dojo-compatible SMD

Parameters:
bool$flag
Returns:
Zend_Json_Server_Smd

Definition at line 274 of file Smd.php.

setEnvelope ( envelopeType )

Set envelope

Parameters:
string$envelopeType
Returns:
Zend_Json_Server_Smd

Definition at line 155 of file Smd.php.

setId ( id )

Set service ID

Parameters:
string$Id
Returns:
Zend_Json_Server_Smd

Definition at line 230 of file Smd.php.

setOptions ( array $  options )

Set object state via options

Parameters:
array$options
Returns:
Zend_Json_Server_Smd

Definition at line 111 of file Smd.php.

setServices ( array $  services )

Overwrite existing services with new ones

Parameters:
array$services
Returns:
Zend_Json_Server_Smd

Definition at line 338 of file Smd.php.

setTarget ( target )

Set service target

Parameters:
string$target
Returns:
Zend_Json_Server_Smd

Definition at line 208 of file Smd.php.

setTransport ( transport )

Set transport

Parameters:
string$transport
Returns:
Zend_Json_Server_Smd

Definition at line 129 of file Smd.php.

toArray (  )

Cast to array

Returns:
array

Definition at line 388 of file Smd.php.

toDojoArray (  )

Export to DOJO-compatible SMD array

Returns:
array

Definition at line 425 of file Smd.php.

toJson (  )

Cast to JSON

Returns:
string

Definition at line 464 of file Smd.php.


Field Documentation

$_envelopeTypes [protected]
Initial value:
 array(
        self::ENV_JSONRPC_1,
        self::ENV_JSONRPC_2,
    )

Definition at line 70 of file Smd.php.


The documentation for this class was generated from the following file: