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 [email protected] so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Json
- Subpackage
- Server
- Version
- $Id: Request.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_Json_Server_Request
Package: Zend\Json\Server
- Children
- \Zend_Json_Server_Request_Http
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 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_RequestAdd 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_RequestAdd many params
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $params | array |
| Type | Description |
|---|---|
| \Zend_Json_Server_Request |

getParam(int | string $index) : mixed | nullRetrieve param by index or key
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $index | int | string |
| Type | Description |
|---|---|
| mixed | null | Null when not found |

loadJson(string $json) : voidSet request state based on JSON
Parameters
| Name | Type | Description |
|---|---|---|
| $json | string |

setId(mixed $name) : \Zend_Json_Server_RequestSet request identifier
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $name | mixed |
| Type | Description |
|---|---|
| \Zend_Json_Server_Request |

setMethod(string $name) : \Zend_Json_Server_RequestSet request method
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| \Zend_Json_Server_Request |

setOptions(array $options) : \Zend_Json_Server_RequestSet request state
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $options | array |
| Type | Description |
|---|---|
| \Zend_Json_Server_Request |

setParams(array $params) : \Zend_Json_Server_RequestOverwrite params
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $params | array |
| Type | Description |
|---|---|
| \Zend_Json_Server_Request |

setVersion(string $version) : \Zend_Json_Server_RequestSet JSON-RPC version
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $version | string |
| Type | Description |
|---|---|
| \Zend_Json_Server_Request |