Zend Framework
3.0
|
Public Member Functions | |
__construct (\Exception $e) | |
Constructor. | |
getException () | |
Retrieve the exception. | |
Public Member Functions inherited from Fault | |
__construct ($code=404, $message= '') | |
Constructor. | |
setCode ($code) | |
Set the fault code. | |
getCode () | |
Return fault code. | |
setMessage ($message) | |
Retrieve fault message. | |
getMessage () | |
Retrieve fault message. | |
setEncoding ($encoding) | |
Set encoding to use in fault response. | |
getEncoding () | |
Retrieve current fault encoding. | |
loadXml ($fault) | |
Load an XMLRPC fault from XML. | |
saveXml () | |
Serialize fault to XML. | |
__toString () | |
Return XML fault response. | |
Static Public Member Functions | |
static | getInstance (\Exception $e) |
Return Zend instance. | |
static | attachFaultException ($classes) |
Attach valid exceptions that can be used to define xmlrpc faults. | |
static | detachFaultException ($classes) |
Detach fault exception classes. | |
static | attachObserver ($class) |
Attach an observer class. | |
static | detachObserver ($class) |
Detach an observer. | |
Static Public Member Functions inherited from Fault | |
static | isFault ($xml) |
Determine if an XML response is an XMLRPC fault. | |
Protected Attributes | |
$exception | |
Protected Attributes inherited from Fault | |
$code | |
$encoding = 'UTF-8' | |
$message | |
$internal | |
Static Protected Attributes | |
static | $faultExceptionClasses = ['Zend\\XmlRpc\\Server\\Exception\\ExceptionInterface' => true] |
static | $observers = [] |
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.
__construct | ( | \Exception | $e | ) |
|
static |
Attach valid exceptions that can be used to define xmlrpc faults.
string | array | $classes | Class name or array of class names |
|
static |
Attach an observer class.
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 | $class |
|
static |
Detach fault exception classes.
string | array | $classes | Class name or array of class names |
|
static |
Detach an observer.
string | $class |
getException | ( | ) |
Retrieve the exception.
public
|
static |
|
protected |
|
staticprotected |
|
staticprotected |