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'
array $_envelopeTypes = 'array'
Allowed envelope types
$_name = ''
string $_nameRegex = '/^[a-z][a-z0-9._]+$/i'
Regex for names
array $_paramMap = 'array'
Mapping of parameter types to JSON-RPC types
array $_paramOptionTypes = 'array'
Parameter option types
array $_params = 'array'
Service params
$_return = ''
$_target = ''
$_transport = 'POST'
array $_transportTypes = 'array'
Allowed transport types
__construct(
string|array $spec
)
:
void
Constructor
__toString(
)
:
string
Cast to string
_validateParamType(
string $type, $isReturn
=
false
)
:
true
Validate parameter type
addParam(
string|array $type, array $options
=
array, int|null $order
=
null
)
:
Zend_Json_Server_Smd_Service
Add a parameter to the service
addParams(
array $params
)
:
Zend_Json_Server_Smd_Service
Add params
Each param should be an array, and should include the key 'type'.
getEnvelope(
)
:
string
Get envelope type
getName(
)
:
string
Retrieve name
getParams(
)
:
array
Get all parameters
Returns all params in specified order.
getReturn(
)
:
string|array
Get return type
getTarget(
)
:
string
Get service target
getTransport(
)
:
string
Get transport
setEnvelope(
string $envelopeType
)
:
Zend_Json_Server_Smd_Service
Set envelope type
setName(
string $name
)
:
Zend_Json_Server_Smd_Service
Set service name
setOptions(
array $options
)
:
Zend_Json_Server_Smd_Service
Set object state
setParams(
array $params
)
:
Zend_Json_Server_Smd_Service
Overwrite all parameters
setReturn(
string|array $type
)
:
Zend_Json_Server_Smd_Service
Set return type
setTarget(
string $target
)
:
Zend_Json_Server_Smd_Service
Set service target
setTransport(
string $transport
)
:
Zend_Json_Server_Smd_Service
Set Transport
Currently limited to POST
toArray(
)
:
array
Cast service description to array
toJson(
)
:
string
Return JSON encoding of service