Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
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 Zend_XmlRpc_Server_Fault.

array
$_faultExceptionClasses= 'array'
array
Details
__toString(
)
:
string
Return XML fault response
Inherited from: \Zend_XmlRpc_Fault::__toString()Type | Description |
---|---|
string |

attachFaultException(
string|array $classes
)
:
void
Attach valid exceptions that can be used to define xmlrpc faults
Name | Type | Description |
---|---|---|
$classes | string|array | Class name or array of class names |

attachObserver(
string $class
)
:
boolean
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.
Name | Type | Description |
---|---|---|
$class | string |
Type | Description |
---|---|
boolean |

detachFaultException(
string|array $classes
)
:
void
Detach fault exception classes
Name | Type | Description |
---|---|---|
$classes | string|array | Class name or array of class names |

detachObserver(
string $class
)
:
boolean
Detach an observer
Name | Type | Description |
---|---|---|
$class | string |
Type | Description |
---|---|
boolean |

getCode(
)
:
int
Return fault code
Inherited from: \Zend_XmlRpc_Fault::getCode()Type | Description |
---|---|
int |

getEncoding(
)
:
string
Retrieve current fault encoding
Inherited from: \Zend_XmlRpc_Fault::getEncoding()Type | Description |
---|---|
string |

getInstance(
\Exception $e
)
:
\Zend_XmlRpc_Server_Fault
Return Zend_XmlRpc_Server_Fault instance

getMessage(
)
:
string
Retrieve fault message
Inherited from: \Zend_XmlRpc_Fault::getMessage()Type | Description |
---|---|
string |

isFault(
string $xml
)
:
boolean
Name | Type | Description |
---|---|---|
$xml | string |
Type | Description |
---|---|
boolean |

loadXml(
string $fault
)
:
boolean
Load an XMLRPC fault from XML
Inherited from: \Zend_XmlRpc_Fault::loadXml()Name | Type | Description |
---|---|---|
$fault | string |
Type | Description |
---|---|
boolean | Returns true if successfully loaded fault response, false if response was not a fault response |
Exception | Description |
---|---|
\Zend_XmlRpc_Exception | if no or faulty XML provided, or if fault response does not contain either code or message |

saveXml(
)
:
string
Serialize fault to XML
Inherited from: \Zend_XmlRpc_Fault::saveXml()Type | Description |
---|---|
string |

setCode(
int $code
)
:
\Zend_XmlRpc_Fault
Set the fault code
Inherited from: \Zend_XmlRpc_Fault::setCode()
setEncoding(
string $encoding
)
:
\Zend_XmlRpc_Fault
Set encoding to use in fault response
Inherited from: \Zend_XmlRpc_Fault::setEncoding()
setMessage(
$message
)
:
\Zend_XmlRpc_Fault
Retrieve fault message
Inherited from: \Zend_XmlRpc_Fault::setMessage()