API Documentation

Json/Server/Smd/Service.php

Includes 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
Classes
Zend_Json_Server_Smd_Service

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_Service

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: Service.php 20096 2010-01-06 02:05:09Z bkarwin $
Properties
$_envelope
$_name
$_return
$_target
$_transport
$_envelopeTypes
$_nameRegex
$_paramOptionTypes
$_params
$_paramMap
$_transportTypes
Methods
__construct
setOptions
setName
getName
setTransport
getTransport
setTarget
getTarget
setEnvelope
getEnvelope
addParam
addParams
setParams
getParams
setReturn
getReturn
toArray
toJson
__toString
_validateParamType

Description

Create Service Mapping Description for a method

Properties

$_envelope

 $_envelope = 'Zend_Json_Server_Smd'

Details

visibility
protected
default
Zend_Json_Server_Smd
final
false
static
false

$_envelopeTypes

array $_envelopeTypes = 'array'

Allowed envelope types

Details

$_envelopeTypes
array
visibility
protected
default
array
final
false
static
false

$_name

 $_name = ''

Details

visibility
protected
default
final
false
static
false

$_nameRegex

string $_nameRegex = '/^[a-z][a-z0-9._]+$/i'

Regex for names

Details

$_nameRegex
string
visibility
protected
default
/^[a-z][a-z0-9._]+$/i
final
false
static
false

$_paramMap

array $_paramMap = 'array'

Mapping of parameter types to JSON-RPC types

Details

$_paramMap
array
visibility
protected
default
array
final
false
static
false

$_paramOptionTypes

array $_paramOptionTypes = 'array'

Parameter option types

Details

$_paramOptionTypes
array
visibility
protected
default
array
final
false
static
false

$_params

array $_params = 'array'

Service params

Details

$_params
array
visibility
protected
default
array
final
false
static
false

$_return

 $_return = ''

Details

visibility
protected
default
final
false
static
false

$_target

 $_target = ''

Details

visibility
protected
default
final
false
static
false

$_transport

 $_transport = 'POST'

Details

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

__construct

__construct( string|array $spec ) : void

Constructor

Arguments
$spec
stringarray
Details
visibility
public
final
false
static
false
throws
if no name provided

__toString

__toString( ) : string

Cast to string

Output
string
Details
visibility
public
final
false
static
false

_validateParamType

_validateParamType( string $type,  $isReturn = false ) : true

Validate parameter type

Arguments
$type
string
$isReturn
Output
true
Details
visibility
protected
final
false
static
false
throws

addParam

addParam( string|array $type, array $options = array, int|null $order = null ) : Zend_Json_Server_Smd_Service

Add a parameter to the service

Arguments
$type
stringarray
$options
array
$order
intnull
Details
visibility
public
final
false
static
false

addParams

addParams( array $params ) : Zend_Json_Server_Smd_Service

Add params

Each param should be an array, and should include the key 'type'.

Arguments
$params
array
Details
visibility
public
final
false
static
false

getEnvelope

getEnvelope( ) : string

Get envelope type

Output
string
Details
visibility
public
final
false
static
false

getName

getName( ) : string

Retrieve name

Output
string
Details
visibility
public
final
false
static
false

getParams

getParams( ) : array

Get all parameters

Returns all params in specified order.

Output
array
Details
visibility
public
final
false
static
false

getReturn

getReturn( ) : string|array

Get return type

Output
string|array
Details
visibility
public
final
false
static
false

getTarget

getTarget( ) : string

Get 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

setEnvelope

setEnvelope( string $envelopeType ) : Zend_Json_Server_Smd_Service

Set envelope type

Arguments
$envelopeType
string
Details
visibility
public
final
false
static
false

setName

setName( string $name ) : Zend_Json_Server_Smd_Service

Set service name

Arguments
$name
string
Details
visibility
public
final
false
static
false
throws

setOptions

setOptions( array $options ) : Zend_Json_Server_Smd_Service

Set object state

Arguments
$options
array
Details
visibility
public
final
false
static
false

setParams

setParams( array $params ) : Zend_Json_Server_Smd_Service

Overwrite all parameters

Arguments
$params
array
Details
visibility
public
final
false
static
false

setReturn

setReturn( string|array $type ) : Zend_Json_Server_Smd_Service

Set return type

Arguments
$type
stringarray
Details
visibility
public
final
false
static
false

setTarget

setTarget( string $target ) : Zend_Json_Server_Smd_Service

Set service target

Arguments
$target
string
Details
visibility
public
final
false
static
false

setTransport

setTransport( string $transport ) : Zend_Json_Server_Smd_Service

Set Transport

Currently limited to POST

Arguments
$transport
string
Details
visibility
public
final
false
static
false

toArray

toArray( ) : array

Cast service description to array

Output
array
Details
visibility
public
final
false
static
false

toJson

toJson( ) : string

Return JSON encoding of service

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