Json/Server/Smd.php
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-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Json
- Subpackage
- Server
- Version
- $Id$
\Zend_Json_Server_Smd
Package: Zend_Json\Server
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants
Properties
string $_contentType = 'application/json'
Content type
Default value
'application/json'
Details- Type
- string
string $_contentTypeRegex = '#[a-z]+/[a-z][a-z-]+#i'
Content type regex
Default value
'#[a-z]+/[a-z][a-z-]+#i'
Details- Type
- string
string $_envelope = self::ENV_JSONRPC_1
Current envelope
Default value
self::ENV_JSONRPC_1
Details- Type
- string
array $_envelopeTypes = array(self::ENV_JSONRPC_1, self::ENV_JSONRPC_2)
Allowed envelope types
Default value
array(self::ENV_JSONRPC_1, self::ENV_JSONRPC_2)
Details- Type
- array
Methods
addService(\Zend_Json_Server_Smd_Service | array $service) : void
Add Service
Parameters
Name | Type | Description |
---|---|---|
$service | \Zend_Json_Server_Smd_Service | array |
addServices(array $services) : \Zend_Json_Server_Smd
Add many services
Parameters
Returns
Name | Type | Description |
---|---|---|
$services | array |
Type | Description |
---|---|
\Zend_Json_Server_Smd |
getService(string $name) : false | \Zend_Json_Server_Smd_Service
Get service object
Parameters
Returns
Name | Type | Description |
---|---|---|
$name | string |
Type | Description |
---|---|
false | \Zend_Json_Server_Smd_Service |
removeService(string $name) : boolean
Remove service
Parameters
Returns
Name | Type | Description |
---|---|---|
$name | string |
Type | Description |
---|---|
boolean |
setContentType(string $type) : \Zend_Json_Server_Smd
Set content type
Parameters
Returns
Name | Type | Description |
---|---|---|
$type | string |
Type | Description |
---|---|
\Zend_Json_Server_Smd |
setDescription(string $description) : \Zend_Json_Server_Smd
Set service description
Parameters
Returns
Name | Type | Description |
---|---|---|
$description | string |
Type | Description |
---|---|
\Zend_Json_Server_Smd |
setDojoCompatible(bool $flag) : \Zend_Json_Server_Smd
Indicate whether or not to generate Dojo-compatible SMD
Parameters
Returns
Name | Type | Description |
---|---|---|
$flag | bool |
Type | Description |
---|---|
\Zend_Json_Server_Smd |
setEnvelope(string $envelopeType) : \Zend_Json_Server_Smd
Set envelope
Parameters
Returns
Name | Type | Description |
---|---|---|
$envelopeType | string |
Type | Description |
---|---|
\Zend_Json_Server_Smd |
setId( $id) : \Zend_Json_Server_Smd
Set service ID
Parameters
Returns
Name | Type | Description |
---|---|---|
$id |
Type | Description |
---|---|
\Zend_Json_Server_Smd |
setOptions(array $options) : \Zend_Json_Server_Smd
Set object state via options
Parameters
Returns
Name | Type | Description |
---|---|---|
$options | array |
Type | Description |
---|---|
\Zend_Json_Server_Smd |
setServices(array $services) : \Zend_Json_Server_Smd
Overwrite existing services with new ones
Parameters
Returns
Name | Type | Description |
---|---|---|
$services | array |
Type | Description |
---|---|
\Zend_Json_Server_Smd |
setTarget(string $target) : \Zend_Json_Server_Smd
Set service target
Parameters
Returns
Name | Type | Description |
---|---|---|
$target | string |
Type | Description |
---|---|
\Zend_Json_Server_Smd |
setTransport(string $transport) : \Zend_Json_Server_Smd
Set transport
Parameters
Returns
Name | Type | Description |
---|---|---|
$transport | string |
Type | Description |
---|---|
\Zend_Json_Server_Smd |