Json/Server/Error.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
- Version
- $Id: Error.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_Json_Server_Error
Package: Zend\Json
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants
Properties


array $_allowedCodes = array(self::ERROR_PARSE, self::ERROR_INVALID_REQUEST, self::ERROR_INVALID_METHOD, self::ERROR_INVALID_PARAMS, self::ERROR_INTERNAL, self::ERROR_OTHER)
Allowed error codes
Default value
array(self::ERROR_PARSE, self::ERROR_INVALID_REQUEST, self::ERROR_INVALID_METHOD, self::ERROR_INVALID_PARAMS, self::ERROR_INTERNAL, self::ERROR_OTHER)
Details- Type
- array
Methods


__construct(string $message = null, int $code = -32000, mixed $data = null) : void
Constructor
Parameters
Name | Type | Description |
---|---|---|
$message | string | |
$code | int | |
$data | mixed |


setCode(int $code) : \Zend_Json_Server_Error
Set error code
Parameters
Returns
Name | Type | Description |
---|---|---|
$code | int |
Type | Description |
---|---|
\Zend_Json_Server_Error |


setData(mixed $data) : \Zend_Json_Server_Error
Set error data
Parameters
Returns
Name | Type | Description |
---|---|---|
$data | mixed |
Type | Description |
---|---|
\Zend_Json_Server_Error |


setMessage(string $message) : \Zend_Json_Server_Error
Set error message
Parameters
Returns
Name | Type | Description |
---|---|---|
$message | string |
Type | Description |
---|---|
\Zend_Json_Server_Error |