API Documentation

Zend/Json/Server/Error.php

Show: inherited
Table of Contents

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-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Json  
Version
$Id: Error.php 24594 2012-01-05 21:27:01Z 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

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

Properties

Propertyprotectedarray  $_allowedCodes= 'array( self::ERROR_PARSE'

Allowed error codes

Default valuearray( self::ERROR_PARSEDetails
Type
array
Propertyprotectedint  $_code= '-32000'

Current code

Default value-32000Details
Type
int
Propertyprotectedmixed  $_data= ''

Error data

Details
Type
mixed
Propertyprotectedstring  $_message= ''

Error message

Details
Type
string

Methods

methodpublic__construct( string $message = null, int $code = -32000, mixed $data = null ) : void

Constructor

Parameters
Name Type Description
$message string
$code int
$data mixed
methodpublic__toString( ) : string

Cast to string (JSON)

Returns
Type Description
string
methodpublicgetCode( ) : int|null

Get error code

Returns
Type Description
int|null
methodpublicgetData( ) : mixed

Get error data

Returns
Type Description
mixed
methodpublicgetMessage( ) : string

Get error message

Returns
Type Description
string
methodpublicsetCode( int $code ) : \Zend_Json_Server_Error

Set error code

Parameters
Name Type Description
$code int
Returns
Type Description
\Zend_Json_Server_Error
methodpublicsetData( mixed $data ) : \Zend_Json_Server_Error

Set error data

Parameters
Name Type Description
$data mixed
Returns
Type Description
\Zend_Json_Server_Error
methodpublicsetMessage( string $message ) : \Zend_Json_Server_Error

Set error message

Parameters
Name Type Description
$message string
Returns
Type Description
\Zend_Json_Server_Error
methodpublictoArray( ) : array

Cast error to array

Returns
Type Description
array
methodpublictoJson( ) : string

Cast error to JSON

Returns
Type Description
string
Documentation was generated by DocBlox 0.15.1.