2097. Class

2097.1. Zend\XmlRpc\Fault

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.

2097.1.1. Methods

2097.1.1.1. __construct

__construct()

Constructor

2097.1.1.2. setCode

setCode()

Set the fault code

Parameters:int
Return type:Fault

2097.1.1.3. getCode

getCode()

Return fault code

Return type:int

2097.1.1.4. setMessage

setMessage()

Retrieve fault message

Parameters:string
Return type:Fault

2097.1.1.5. getMessage

getMessage()

Retrieve fault message

Return type:string

2097.1.1.6. setEncoding

setEncoding()

Set encoding to use in fault response

Parameters:string
Return type:Fault

2097.1.1.7. getEncoding

getEncoding()

Retrieve current fault encoding

Return type:string

2097.1.1.8. loadXml

loadXml()

Load an XMLRPC fault from XML

Parameters:string
Return type:bool Returns true if successfully loaded fault response, false

if response was not a fault response

throws:ExceptionExceptionInterface if no or faulty XML provided, or if fault

response does not contain either code or message

2097.1.1.9. isFault

isFault()

Determine if an XML response is an XMLRPC fault

Parameters:string
Return type:bool

2097.1.1.10. saveXml

saveXml()

Serialize fault to XML

Return type:string

2097.1.1.11. __toString

__toString()

Return XML fault response

Return type:string