Public Member Functions |
| __construct ($message=null, $code=-32000, $data=null) |
| setCode ($code) |
| getCode () |
| setMessage ($message) |
| getMessage () |
| setData ($data) |
| getData () |
| toArray () |
| toJson () |
| __toString () |
Data Fields |
const | ERROR_PARSE = -32768 |
const | ERROR_INVALID_REQUEST = -32600 |
const | ERROR_INVALID_METHOD = -32601 |
const | ERROR_INVALID_PARAMS = -32602 |
const | ERROR_INTERNAL = -32603 |
const | ERROR_OTHER = -32000 |
Protected Attributes |
| $_allowedCodes |
| $_code = -32000 |
| $_data |
| $_message |
Detailed Description
Definition at line 28 of file Error.php.
Constructor & Destructor Documentation
__construct |
( |
$ |
message = null , |
|
|
$ |
code = -32000 , |
|
|
$ |
data = null |
|
) |
| |
Constructor
- Parameters:
-
string | $message | |
int | $code | |
mixed | $data | |
- Returns:
- void
Definition at line 76 of file Error.php.
Member Function Documentation
Cast to string (JSON)
- Returns:
- string
Definition at line 193 of file Error.php.
Get error code
- Returns:
- int|null
Definition at line 110 of file Error.php.
Get error data
- Returns:
- mixed
Definition at line 158 of file Error.php.
Get error message
- Returns:
- string
Definition at line 136 of file Error.php.
Cast error to array
- Returns:
- array
Definition at line 168 of file Error.php.
Cast error to JSON
- Returns:
- string
Definition at line 182 of file Error.php.
Field Documentation
$_allowedCodes [protected] |
Initial value: array(
self::ERROR_PARSE,
self::ERROR_INVALID_REQUEST,
self::ERROR_INVALID_METHOD,
self::ERROR_INVALID_PARAMS,
self::ERROR_INTERNAL,
self::ERROR_OTHER,
)
Definition at line 41 of file Error.php.
The documentation for this class was generated from the following file:
- E:/E/GEAMP/www/openbiz/openbiz/others/Zend/Json/Server/Error.php