API Documentation

Json/Server/Smd.php

Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Json
subpackage
Server
version
$Id: Smd.php 20096 2010-01-06 02:05:09Z bkarwin $
Classes
Zend_Json_Server_Smd

Description

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.

Zend_Json_Server_Smd

category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Json
subpackage
Server
Constants
ENV_JSONRPC_1
ENV_JSONRPC_2
SMD_VERSION
Properties
$_contentType
$_contentTypeRegex
$_description
$_dojoCompatible
$_envelope
$_envelopeTypes
$_id
$_services
$_target
$_transport
$_transportTypes
Methods
setOptions
setTransport
getTransport
setEnvelope
getEnvelope
setContentType
getContentType
setTarget
getTarget
setId
getId
setDescription
getDescription
setDojoCompatible
isDojoCompatible
addService
addServices
setServices
getService
getServices
removeService
toArray
toDojoArray
toJson
__toString

Description

Constants

ENV_JSONRPC_1

 ENV_JSONRPC_1 = 'JSON-RPC-1.0'

Details

value
JSON-RPC-1.0

ENV_JSONRPC_2

 ENV_JSONRPC_2 = 'JSON-RPC-2.0'

Details

value
JSON-RPC-2.0

SMD_VERSION

 SMD_VERSION = '2.0'

Details

value
2.0

Properties

$_contentType

string $_contentType = 'application/json'

Content type

Details

$_contentType
string
visibility
protected
default
application/json
final
false
static
false

$_contentTypeRegex

string $_contentTypeRegex = '#[a-z]+/[a-z][a-z-]+#i'

Content type regex

Details

$_contentTypeRegex
string
visibility
protected
default
#[a-z]+/[a-z][a-z-]+#i
final
false
static
false

$_description

string $_description = ''

Service description

Details

$_description
string
visibility
protected
default
final
false
static
false

$_dojoCompatible

bool $_dojoCompatible = 'false'

Generate Dojo-compatible SMD

Details

$_dojoCompatible
bool
visibility
protected
default
false
final
false
static
false

$_envelope

string $_envelope = 'self'

Current envelope

Details

$_envelope
string
visibility
protected
default
self
final
false
static
false

$_envelopeTypes

array $_envelopeTypes = 'array'

Allowed envelope types

Details

$_envelopeTypes
array
visibility
protected
default
array
final
false
static
false

$_id

string $_id = ''

Service id

Details

$_id
string
visibility
protected
default
final
false
static
false

$_services

array $_services = 'array'

Services offerred

Details

$_services
array
visibility
protected
default
array
final
false
static
false

$_target

string $_target = ''

Service target

Details

$_target
string
visibility
protected
default
final
false
static
false

$_transport

string $_transport = 'POST'

Global transport

Details

$_transport
string
visibility
protected
default
POST
final
false
static
false

$_transportTypes

array $_transportTypes = 'array'

Allowed transport types

Details

$_transportTypes
array
visibility
protected
default
array
final
false
static
false

Methods

__toString

__toString( ) : string

Cast to string (JSON)

Output
string
Details
visibility
public
final
false
static
false

addService

addService( Zend_Json_Server_Smd_Service|array $service ) : void

Add Service

Arguments
$service
Zend_Json_Server_Smd_Servicearray
Details
visibility
public
final
false
static
false

addServices

addServices( array $services ) : Zend_Json_Server_Smd

Add many services

Arguments
$services
array
Details
visibility
public
final
false
static
false

getContentType

getContentType( ) : string

Retrieve content type

Output
string
Details
visibility
public
final
false
static
false

getDescription

getDescription( ) : string

Get service description

Output
string
Details
visibility
public
final
false
static
false

getEnvelope

getEnvelope( ) : string

Retrieve envelope

Output
string
Details
visibility
public
final
false
static
false

getId

getId( ) : string

Get service id

Output
string
Details
visibility
public
final
false
static
false

getService

getService( string $name ) : false|Zend_Json_Server_Smd_Service

Get service object

Arguments
$name
string
Details
visibility
public
final
false
static
false

getServices

getServices( ) : array

Return services

Output
array
Details
visibility
public
final
false
static
false

getTarget

getTarget( ) : string

Retrieve service target

Output
string
Details
visibility
public
final
false
static
false

getTransport

getTransport( ) : string

Get transport

Output
string
Details
visibility
public
final
false
static
false

isDojoCompatible

isDojoCompatible( ) : bool

Is this a Dojo compatible SMD?

Output
bool
Details
visibility
public
final
false
static
false

removeService

removeService( string $name ) : boolean

Remove service

Arguments
$name
string
Output
boolean
Details
visibility
public
final
false
static
false

setContentType

setContentType( string $type ) : Zend_Json_Server_Smd

Set content type

Arguments
$type
string
Details
visibility
public
final
false
static
false

setDescription

setDescription( string $description ) : Zend_Json_Server_Smd

Set service description

Arguments
$description
string
Details
visibility
public
final
false
static
false

setDojoCompatible

setDojoCompatible( bool $flag ) : Zend_Json_Server_Smd

Indicate whether or not to generate Dojo-compatible SMD

Arguments
$flag
bool
Details
visibility
public
final
false
static
false

setEnvelope

setEnvelope( string $envelopeType ) : Zend_Json_Server_Smd

Set envelope

Arguments
$envelopeType
string
Details
visibility
public
final
false
static
false

setId

setId(  $id ) : Zend_Json_Server_Smd

Set service ID

Arguments
$id
Details
visibility
public
final
false
static
false

setOptions

setOptions( array $options ) : Zend_Json_Server_Smd

Set object state via options

Arguments
$options
array
Details
visibility
public
final
false
static
false

setServices

setServices( array $services ) : Zend_Json_Server_Smd

Overwrite existing services with new ones

Arguments
$services
array
Details
visibility
public
final
false
static
false

setTarget

setTarget( string $target ) : Zend_Json_Server_Smd

Set service target

Arguments
$target
string
Details
visibility
public
final
false
static
false

setTransport

setTransport( string $transport ) : Zend_Json_Server_Smd

Set transport

Arguments
$transport
string
Details
visibility
public
final
false
static
false

toArray

toArray( ) : array

Cast to array

Output
array
Details
visibility
public
final
false
static
false

toDojoArray

toDojoArray( ) : array

Export to DOJO-compatible SMD array

Output
array
Details
visibility
public
final
false
static
false

toJson

toJson( ) : string

Cast to JSON

Output
string
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.