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.
Create Service Mapping Description for a method

$_envelope= 'Zend_Json_Server_Smd::ENV_JSONRPC_1'
Zend_Json_Server_Smd::ENV_JSONRPC_1
Details
array
$_envelopeTypes= 'array(
Zend_Json_Server_Smd::ENV_JSONRPC_1'
Allowed envelope types
array(
Zend_Json_Server_Smd::ENV_JSONRPC_1
Details
string
$_nameRegex= ''/^[a-z][a-z0-9._]+$/i''
Regex for names
'/^[a-z][a-z0-9._]+$/i'
Details
array
$_paramMap= 'array(
'any' => 'any''
Mapping of parameter types to JSON-RPC types
array(
'any' => 'any'
Details
array
$_paramOptionTypes= 'array(
'name' => 'is_string''
Parameter option types
array(
'name' => 'is_string'
Details
__construct(
string|array $spec
)
:
void
Constructor
Name | Type | Description |
---|---|---|
$spec | string|array |
Exception | Description |
---|---|
\Zend_Json_Server_Exception | if no name provided |

_validateParamType(
string $type, $isReturn
=
false
)
:
true
Validate parameter type
Name | Type | Description |
---|---|---|
$type | string | |
$isReturn |
Type | Description |
---|---|
true |
Exception | Description |
---|---|
\Zend_Json_Server_Exception |

addParam(
string|array $type, array $options
=
array(), int|null $order
=
null
)
:
\Zend_Json_Server_Smd_Service
Add a parameter to the service
Name | Type | Description |
---|---|---|
$type | string|array | |
$options | array | |
$order | int|null |
Type | Description |
---|---|
\Zend_Json_Server_Smd_Service |

addParams(
array $params
)
:
\Zend_Json_Server_Smd_Service
Add params
Each param should be an array, and should include the key 'type'.
Name | Type | Description |
---|---|---|
$params | array |
Type | Description |
---|---|
\Zend_Json_Server_Smd_Service |

getParams(
)
:
array
Get all parameters
Returns all params in specified order.
Type | Description |
---|---|
array |

setEnvelope(
string $envelopeType
)
:
\Zend_Json_Server_Smd_Service
Set envelope type
Name | Type | Description |
---|---|---|
$envelopeType | string |
Type | Description |
---|---|
\Zend_Json_Server_Smd_Service |

setName(
string $name
)
:
\Zend_Json_Server_Smd_Service
Set service name
Name | Type | Description |
---|---|---|
$name | string |
Type | Description |
---|---|
\Zend_Json_Server_Smd_Service |
Exception | Description |
---|---|
\Zend_Json_Server_Exception |

setOptions(
array $options
)
:
\Zend_Json_Server_Smd_Service
Set object state
Name | Type | Description |
---|---|---|
$options | array |
Type | Description |
---|---|
\Zend_Json_Server_Smd_Service |

setParams(
array $params
)
:
\Zend_Json_Server_Smd_Service
Overwrite all parameters
Name | Type | Description |
---|---|---|
$params | array |
Type | Description |
---|---|
\Zend_Json_Server_Smd_Service |

setReturn(
string|array $type
)
:
\Zend_Json_Server_Smd_Service
Set return type
Name | Type | Description |
---|---|---|
$type | string|array |
Type | Description |
---|---|
\Zend_Json_Server_Smd_Service |

setTarget(
string $target
)
:
\Zend_Json_Server_Smd_Service
Set service target
Name | Type | Description |
---|---|---|
$target | string |
Type | Description |
---|---|
\Zend_Json_Server_Smd_Service |

setTransport(
string $transport
)
:
\Zend_Json_Server_Smd_Service
Set Transport
Currently limited to POST
Name | Type | Description |
---|---|---|
$transport | string |
Type | Description |
---|---|
\Zend_Json_Server_Smd_Service |