Inheritances
Files
Overview
FRAMES
NO FRAMES

Class Zend_Json_Server_Error

Zend_Json
|- class Zend_Json_Server_Error
Defined in line 28 of file Json/Server/Error.php.
CategoryZend
PackageZend_Json
CopyrightCopyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
Licensehttp://framework.zend.com/license/new-bsd New BSD License

Summary

Class constants
ERROR_PARSE
ERROR_INVALID_REQUEST
ERROR_INVALID_METHOD
ERROR_INVALID_PARAMS
ERROR_INTERNAL
ERROR_OTHER
Instance fields
# $_allowedCodes Allowed error codes
# $_code Current code
# $_data Error data
# $_message Error message
Instance methods
+ __construct() Constructor
+ __toString() Cast to string (JSON)
+ getCode() Get error code
+ getData() Get error data
+ getMessage() Get error message
+ setCode() Set error code
+ setData() Set error data
+ setMessage() Set error message
+ toArray() Cast error to array
+ toJson() Cast error to JSON

Details

Class constants

ERROR_PARSE
const ERROR_PARSE = -32768
ERROR_INVALID_REQUEST
const ERROR_INVALID_REQUEST = -32600
ERROR_INVALID_METHOD
const ERROR_INVALID_METHOD = -32601
ERROR_INVALID_PARAMS
const ERROR_INVALID_PARAMS = -32602
ERROR_INTERNAL
const ERROR_INTERNAL = -32603
ERROR_OTHER
const ERROR_OTHER = -32000

Instance fields

$_allowedCodes
protected $_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
Var array
$_code
protected $_code = -32000
Current code
Var int
$_data
protected $_data
Error data
Var mixed
$_message
protected $_message
Error message
Var string

Instance methods

__construct()
public function __construct( $message = null
$code = -32000
$data = null
)
Constructor
Parameters
string $message
int $code
mixed $data
Returns void
__toString()
public function __toString( )
Cast to string (JSON)
Returns string
getCode()
public function getCode( )
Get error code
Returns int|null
getData()
public function getData( )
Get error data
Returns mixed
getMessage()
public function getMessage( )
Get error message
Returns string
setCode()
public function setCode( $code)
Set error code
Parameters
int $code
setData()
public function setData( $data)
Set error data
Parameters
mixed $data
setMessage()
public function setMessage( $message)
Set error message
Parameters
string $message
toArray()
public function toArray( )
Cast error to array
Returns array
toJson()
public function toJson( )
Cast error to JSON
Returns string