Json/Server/Request.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_Request
Package: Zend_Json\Server
- Children
- \Zend_Json_Server_Request_Http
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties
string $_methodRegex = '/^[a-z][a-z0-9_.]*$/i'
Regex for method
Default value
'/^[a-z][a-z0-9_.]*$/i'
Details- Type
- string
Methods
addParam(mixed $value, string $key = null) : \Zend_Json_Server_Request
Add a parameter to the request
Parameters
Returns
Name | Type | Description |
---|---|---|
$value | mixed | |
$key | string |
Type | Description |
---|---|
\Zend_Json_Server_Request |
addParams(array $params) : \Zend_Json_Server_Request
Add many params
Parameters
Returns
Name | Type | Description |
---|---|---|
$params | array |
Type | Description |
---|---|
\Zend_Json_Server_Request |
getParam(int | string $index) : mixed | null
Retrieve param by index or key
Parameters
Returns
Name | Type | Description |
---|---|---|
$index | int | string |
Type | Description |
---|---|
mixed | null | Null when not found |
loadJson(string $json) : void
Set request state based on JSON
Parameters
Name | Type | Description |
---|---|---|
$json | string |
setId(mixed $name) : \Zend_Json_Server_Request
Set request identifier
Parameters
Returns
Name | Type | Description |
---|---|---|
$name | mixed |
Type | Description |
---|---|
\Zend_Json_Server_Request |
setMethod(string $name) : \Zend_Json_Server_Request
Set request method
Parameters
Returns
Name | Type | Description |
---|---|---|
$name | string |
Type | Description |
---|---|
\Zend_Json_Server_Request |
setOptions(array $options) : \Zend_Json_Server_Request
Set request state
Parameters
Returns
Name | Type | Description |
---|---|---|
$options | array |
Type | Description |
---|---|
\Zend_Json_Server_Request |
setParams(array $params) : \Zend_Json_Server_Request
Overwrite params
Parameters
Returns
Name | Type | Description |
---|---|---|
$params | array |
Type | Description |
---|---|
\Zend_Json_Server_Request |
setVersion(string $version) : \Zend_Json_Server_Request
Set JSON-RPC version
Parameters
Returns
Name | Type | Description |
---|---|---|
$version | string |
Type | Description |
---|---|
\Zend_Json_Server_Request |