Zend\XmlRpc\Server\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 ; 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 . Observers
need only implement a static 'observe' method.
To allow method chaining, you may use the factory
to instantiate a Zend\XmlRpc\Server\Fault.
Synopsis
class Fault
extends Fault
{
- // members
- protected Exception $exception;
- protected array $faultExceptionClasses;
- protected array $observers;
- // Inherited members from Fault
- protected int $code;
- protected string $encoding;
- protected string $message;
- protected array $internal;
- // methods
- public Fault __construct()
- public static Fault getInstance()
- public static void attachFaultException()
- public static void detachFaultException()
- public static bool attachObserver()
- public static bool detachObserver()
- public Exception getException()
- // Inherited methods from Fault
- public void __construct()
- public Fault setCode()
- public int getCode()
- public Fault setMessage()
- public string getMessage()
- public Fault setEncoding()
- public string getEncoding()
- public bool loadXml()
- public static bool isFault()
- public string saveXml()
- public string __toString()
Hierarchy
Extends
Members
protected
- $code
—
int
Fault code - $encoding
—
string
Fault character encoding - $exception — \Exception
- $faultExceptionClasses — array
- $internal
—
array
Internal fault codes => messages - $message
—
string
Fault message - $observers — array
Methods
public
- __construct() — Constructor
- attachFaultException() — Attach valid exceptions that can be used to define xmlrpc faults
- attachObserver() — Attach an observer class
- detachFaultException() — Detach fault exception classes
- detachObserver() — Detach an observer
- getException() — Retrieve the exception
- getInstance() — Return Zend\XmlRpc\Server\Fault instance
Inherited from Zend\XmlRpc\Fault
public
- __toString() — Return XML fault response
- getCode() — Return fault code
- getEncoding() — Retrieve current fault encoding
- getMessage() — Retrieve fault message
- isFault() — Determine if an XML response is an XMLRPC fault
- loadXml() — Load an XMLRPC fault from XML
- saveXml() — Serialize fault to XML
- setCode() — Set the fault code
- setEncoding() — Set encoding to use in fault response
- setMessage() — Retrieve fault message