Fully Qualified Name: | Laminas\XmlRpc\Server\Fault |
Extends: | Fault |
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 {@link 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 {@link attachObserver()}. Observers need only implement a static 'observe' method.
To allow method chaining, you may use the {@link getInstance()} factory to instantiate a Laminas\XmlRpc\Server\Fault.
Name | Description | Defined By |
---|---|---|
__construct() | Constructor | Fault |
attachFaultException() | Attach valid exceptions that can be used to define xmlrpc faults | Fault |
attachObserver() | Attach an observer class | Fault |
detachFaultException() | Detach fault exception classes | Fault |
detachObserver() | Detach an observer | Fault |
getException() | Retrieve the exception | Fault |
getInstance() | Return Laminas\XmlRpc\Server\Fault instance | Fault |
Constructor
Parameter Name | Type | Description |
---|---|---|
$e | \Exception |
Returns: \Fault
Attach valid exceptions that can be used to define xmlrpc faults
Parameter Name | Type | Description |
---|---|---|
$classes | string|array | Class |
Returns: void
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.
Parameter Name | Type | Description |
---|---|---|
$class | string |
Returns: bool
Detach fault exception classes
Parameter Name | Type | Description |
---|---|---|
$classes | string|array | Class |
Returns: void
Detach an observer
Parameter Name | Type | Description |
---|---|---|
$class | string |
Returns: bool
Retrieve the exception
Returns: \Exception
Return Laminas\XmlRpc\Server\Fault instance
Parameter Name | Type | Description |
---|---|---|
$e | \Exception |
Returns: \Fault