API Documentation

Json/Server/Error.php

Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Json
version
$Id: Error.php 20096 2010-01-06 02:05:09Z bkarwin $
Classes
Zend_Json_Server_Error

Description

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.

Zend_Json_Server_Error

category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Json
Constants
ERROR_PARSE
ERROR_INVALID_REQUEST
ERROR_INVALID_METHOD
ERROR_INVALID_PARAMS
ERROR_INTERNAL
ERROR_OTHER
Properties
$_allowedCodes
$_code
$_data
$_message
Methods
__construct
setCode
getCode
setMessage
getMessage
setData
getData
toArray
toJson
__toString

Description

Constants

ERROR_PARSE

 ERROR_PARSE = '32768'

Details

value
32768

ERROR_INVALID_REQUEST

 ERROR_INVALID_REQUEST = '32600'

Details

value
32600

ERROR_INVALID_METHOD

 ERROR_INVALID_METHOD = '32601'

Details

value
32601

ERROR_INVALID_PARAMS

 ERROR_INVALID_PARAMS = '32602'

Details

value
32602

ERROR_INTERNAL

 ERROR_INTERNAL = '32603'

Details

value
32603

ERROR_OTHER

 ERROR_OTHER = '32000'

Details

value
32000

Properties

$_allowedCodes

array $_allowedCodes = 'array'

Allowed error codes

Details

$_allowedCodes
array
visibility
protected
default
array
final
false
static
false

$_code

int $_code = '32000'

Current code

Details

$_code
int
visibility
protected
default
32000
final
false
static
false

$_data

mixed $_data = ''

Error data

Details

$_data
mixed
visibility
protected
default
final
false
static
false

$_message

string $_message = ''

Error message

Details

$_message
string
visibility
protected
default
final
false
static
false

Methods

__construct

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

Constructor

Arguments
$message
string
$code
int
$data
mixed
Details
visibility
public
final
false
static
false

__toString

__toString( ) : string

Cast to string (JSON)

Output
string
Details
visibility
public
final
false
static
false

getCode

getCode( ) : int|null

Get error code

Output
int|null
Details
visibility
public
final
false
static
false

getData

getData( ) : mixed

Get error data

Output
mixed
Details
visibility
public
final
false
static
false

getMessage

getMessage( ) : string

Get error message

Output
string
Details
visibility
public
final
false
static
false

setCode

setCode( int $code ) : Zend_Json_Server_Error

Set error code

Arguments
$code
int
Details
visibility
public
final
false
static
false

setData

setData( mixed $data ) : Zend_Json_Server_Error

Set error data

Arguments
$data
mixed
Details
visibility
public
final
false
static
false

setMessage

setMessage( string $message ) : Zend_Json_Server_Error

Set error message

Arguments
$message
string
Details
visibility
public
final
false
static
false

toArray

toArray( ) : array

Cast error to array

Output
array
Details
visibility
public
final
false
static
false

toJson

toJson( ) : string

Cast error to JSON

Output
string
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.