API Documentation

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 license@zend.com so we can send you a copy immediately.

category
Zend  
copyright
Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Json  
version
$Id: Error.php 23775 2011-03-01 17:25:24Z ralph $  

\Zend_Json_Server_Error

category
Zend  
copyright
Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Json  

Constants

Constant  ERROR_PARSE = ''
Constant  ERROR_INVALID_REQUEST = ''
Constant  ERROR_INVALID_METHOD = ''
Constant  ERROR_INVALID_PARAMS = ''
Constant  ERROR_INTERNAL = ''
Constant  ERROR_OTHER = ''

Properties

Propertyprotectedarray  $_allowedCodes= 'array'

Allowed error codes

Default valuearrayDetails
Type
array
Propertyprotectedint  $_code= ''

Current code

Details
Type
int
Propertyprotectedmixed  $_data= ''

Error data

Details
Type
mixed
Propertyprotectedstring  $_message= ''

Error message

Details
Type
string

Methods

methodpublic__construct( string $message = null, int $code, 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
intnull
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.13.3.