API Documentation

Zend/Json/Server/Smd.php

Show: inherited
Table of Contents

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Json  
Subpackage
Server  
Version
$Id: Smd.php 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Json_Server_Smd

Package: Zend\Json\Server

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

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

Properties

Propertyprotectedstring  $_contentType= ''application/json''

Content type

Default value'application/json'Details
Type
string
Propertyprotectedstring  $_contentTypeRegex= ''#[a-z]+/[a-z][a-z-]+#i''

Content type regex

Default value'#[a-z]+/[a-z][a-z-]+#i'Details
Type
string
Propertyprotectedstring  $_description= ''

Service description

Details
Type
string
Propertyprotectedbool  $_dojoCompatible= 'false'

Generate Dojo-compatible SMD

Default valuefalseDetails
Type
bool
Propertyprotectedstring  $_envelope= 'self::ENV_JSONRPC_1'

Current envelope

Default valueself::ENV_JSONRPC_1Details
Type
string
Propertyprotectedarray  $_envelopeTypes= 'array( self::ENV_JSONRPC_1'

Allowed envelope types

Default valuearray( self::ENV_JSONRPC_1Details
Type
array
Propertyprotectedstring  $_id= ''

Service id

Details
Type
string
Propertyprotectedarray  $_services= 'array()'

Services offerred

Default valuearray()Details
Type
array
Propertyprotectedstring  $_target= ''

Service target

Details
Type
string
Propertyprotectedstring  $_transport= ''POST''

Global transport

Default value'POST'Details
Type
string
Propertyprotectedarray  $_transportTypes= 'array('POST')'

Allowed transport types

Default valuearray('POST')Details
Type
array

Methods

methodpublic__toString( ) : string

Cast to string (JSON)

Returns
Type Description
string
methodpublicaddService( \Zend_Json_Server_Smd_Service|array $service ) : void

Add Service

Parameters
Name Type Description
$service \Zend_Json_Server_Smd_Service|array
methodpublicaddServices( array $services ) : \Zend_Json_Server_Smd

Add many services

Parameters
Name Type Description
$services array
Returns
Type Description
\Zend_Json_Server_Smd
methodpublicgetContentType( ) : string

Retrieve content type

Returns
Type Description
string
methodpublicgetDescription( ) : string

Get service description

Returns
Type Description
string
methodpublicgetEnvelope( ) : string

Retrieve envelope

Returns
Type Description
string
methodpublicgetId( ) : string

Get service id

Returns
Type Description
string
methodpublicgetService( string $name ) : false|\Zend_Json_Server_Smd_Service

Get service object

Parameters
Name Type Description
$name string
Returns
Type Description
false|\Zend_Json_Server_Smd_Service
methodpublicgetServices( ) : array

Return services

Returns
Type Description
array
methodpublicgetTarget( ) : string

Retrieve service target

Returns
Type Description
string
methodpublicgetTransport( ) : string

Get transport

Returns
Type Description
string
methodpublicisDojoCompatible( ) : bool

Is this a Dojo compatible SMD?

Returns
Type Description
bool
methodpublicremoveService( string $name ) : boolean

Remove service

Parameters
Name Type Description
$name string
Returns
Type Description
boolean
methodpublicsetContentType( string $type ) : \Zend_Json_Server_Smd

Set content type

Parameters
Name Type Description
$type string
Returns
Type Description
\Zend_Json_Server_Smd
methodpublicsetDescription( string $description ) : \Zend_Json_Server_Smd

Set service description

Parameters
Name Type Description
$description string
Returns
Type Description
\Zend_Json_Server_Smd
methodpublicsetDojoCompatible( bool $flag ) : \Zend_Json_Server_Smd

Indicate whether or not to generate Dojo-compatible SMD

Parameters
Name Type Description
$flag bool
Returns
Type Description
\Zend_Json_Server_Smd
methodpublicsetEnvelope( string $envelopeType ) : \Zend_Json_Server_Smd

Set envelope

Parameters
Name Type Description
$envelopeType string
Returns
Type Description
\Zend_Json_Server_Smd
methodpublicsetId(  $id ) : \Zend_Json_Server_Smd

Set service ID

Parameters
Name Type Description
$id
Returns
Type Description
\Zend_Json_Server_Smd
methodpublicsetOptions( array $options ) : \Zend_Json_Server_Smd

Set object state via options

Parameters
Name Type Description
$options array
Returns
Type Description
\Zend_Json_Server_Smd
methodpublicsetServices( array $services ) : \Zend_Json_Server_Smd

Overwrite existing services with new ones

Parameters
Name Type Description
$services array
Returns
Type Description
\Zend_Json_Server_Smd
methodpublicsetTarget( string $target ) : \Zend_Json_Server_Smd

Set service target

Parameters
Name Type Description
$target string
Returns
Type Description
\Zend_Json_Server_Smd
methodpublicsetTransport( string $transport ) : \Zend_Json_Server_Smd

Set transport

Parameters
Name Type Description
$transport string
Returns
Type Description
\Zend_Json_Server_Smd
methodpublictoArray( ) : array

Cast to array

Returns
Type Description
array
methodpublictoDojoArray( ) : array

Export to DOJO-compatible SMD array

Returns
Type Description
array
methodpublictoJson( ) : string

Cast to JSON

Returns
Type Description
string
Documentation was generated by DocBlox 0.15.1.