XMLRPC Server Faults
Encapsulates an exception for use as an XMLRPC fault response. Valid exception classes that may be used for generating the fault code and fault string can be attached using \attachFaultException(); all others use a generic '404 Unknown error' response.
You may also attach fault observers, which would allow you to monitor particular fault cases; this is done via \attachObserver(). Observers need only implement a static 'observe' method.
To allow method chaining, you may use the \getInstance() factory to instantiate a Zend_XmlRpc_Server_Fault.
category | Zend |
---|---|
package | Zend_XmlRpc |
subpackage | Server |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
inherited_from | \Zend_XmlRpc_Fault |
__construct(\Exception $e) : \Zend_XmlRpc_Server_Fault
inherited_from | \Zend_XmlRpc_Fault::__construct() |
---|
\Exception
\Zend_XmlRpc_Server_Fault
__construct($code= 404
, $message= ''
) : \Zend_XmlRpc_Fault
\Zend_XmlRpc_Fault
__toString() : string
string
attachFaultException(string|array $classes) : void
string
array
Class name or array of class names
attachObserver(string $class) : boolean
Allows observation of xmlrpc server faults, thus allowing logging or mail notification of fault responses on the xmlrpc server.
Expects a valid class name; that class must have a public static method 'observe' that accepts an exception as its sole argument.
string
boolean
detachFaultException(string|array $classes) : void
string
array
Class name or array of class names
detachObserver(string $class) : boolean
string
boolean
getCode() : integer
integer
getEncoding() : string
string
getException() : \Exception
access | public |
---|
\Exception
getInstance(\Exception $e) : \Zend_XmlRpc_Server_Fault
\Exception
\Zend_XmlRpc_Server_Fault
getMessage() : string
string
isFault(string $xml) : boolean
string
boolean
loadXml(string $fault) : boolean
string
\Zend_XmlRpc_Exception |
if no or faulty XML provided, or if fault response does not contain either code or message |
---|
boolean
Returns true if successfully loaded fault response, false
if response was not a fault responsesaveXml() : string
string
setCode(integer $code) : \Zend_XmlRpc_Fault
integer
\Zend_XmlRpc_Fault
setEncoding(string $encoding) : \Zend_XmlRpc_Fault
string
\Zend_XmlRpc_Fault
setMessage($message) : \Zend_XmlRpc_Fault
\Zend_XmlRpc_Fault
$_code : integer
$_encoding : string
'UTF-8'
$_exception : \Exception
$_faultExceptionClasses : array
array('Zend_XmlRpc_Server_Exception' => true)
$_internal : array
array(404 => 'Unknown Error', 610 => 'Invalid method class', 611 => 'Unable to attach function or callback; not callable', 612 => 'Unable to load array; not an array', 613 => 'One or more method records are corrupt or otherwise unusable', 620 => 'Method does not exist', 621 => 'Error instantiating class to invoke method', 622 => 'Method missing implementation', 623 => 'Calling parameters do not match signature', 630 => 'Unable to read request', 631 => 'Failed to parse request', 632 => 'Invalid request, no method passed; request must contain a \'methodName\' tag', 633 => 'Param must contain a value', 634 => 'Invalid method name', 635 => 'Invalid XML provided to request', 636 => 'Error creating xmlrpc value', 640 => 'Method does not exist', 650 => 'Invalid XML provided for response', 651 => 'Failed to parse response', 652 => 'Invalid response', 653 => 'Invalid XMLRPC value in response')
$_observers : array
array()