Class Fault

Summary

Fully Qualified Name: Zend\XmlRpc\Fault

Description

XMLRPC Faults

Container for XMLRPC faults, containing both a code and a message; additionally, has methods for determining if an XML response is an XMLRPC fault, as well as generating the XML for an XMLRPC fault response.

To allow method chaining, you may only use the {@link getInstance()} factory to instantiate a Zend\XmlRpc\Server\Fault.

Methods

Name Description Defined By
__construct() Constructor Fault
__toString() Return XML fault response Fault
getCode() Return fault code Fault
getEncoding() Retrieve current fault encoding Fault
getMessage() Retrieve fault message Fault
isFault() Determine if an XML response is an XMLRPC fault Fault
loadXml() Load an XMLRPC fault from XML Fault
saveXml() Serialize fault to XML Fault
setCode() Set the fault code Fault
setEncoding() Set encoding to use in fault response Fault
setMessage() Retrieve fault message Fault

Method Details

__construct()

Constructor

Parameter Name Type Description
$code int
$message string

Returns:

__toString()

Return XML fault response

Returns: string

getCode()

Return fault code

Returns: int

getEncoding()

Retrieve current fault encoding

Returns: string

getMessage()

Retrieve fault message

Returns: string

isFault()

Determine if an XML response is an XMLRPC fault

Parameter Name Type Description
$xml string

Returns: bool

loadXml()

Load an XMLRPC fault from XML

Parameter Name Type Description
$fault string

Returns: bool Returns true if successfully loaded fault response, false if response was not a fault response

saveXml()

Serialize fault to XML

Returns: string

setCode()

Set the fault code

Parameter Name Type Description
$code int

Returns: \Fault

setEncoding()

Set encoding to use in fault response

Parameter Name Type Description
$encoding string

Returns: \Fault

setMessage()

Retrieve fault message

Parameter Name Type Description
$ string
$message

Returns: \Fault

Top