Class 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 getInstance() factory to instantiate a Zend_XmlRpc_Server_Fault.

Located in /Zend/XmlRpc/Fault.php (line 46)


	
			
Direct descendents
Class Description
 class Zend_XmlRpc_Server_Fault XMLRPC Server Faults
Variable Summary
 int $_code
 string $_encoding
 array $_internal
 string $_message
Method Summary
 static boolean isFault (string $xml)
 Zend_XmlRpc_Fault __construct ([ $code = 404], [ $message = ''])
 int getCode ()
 string getEncoding ()
 string getMessage ()
 boolean loadXml (string $fault)
 string saveXML ()
 Zend_XmlRpc_Fault setCode (int $code)
 Zend_XmlRpc_Fault setEncoding (string $encoding)
 Zend_XmlRpc_Fault setMessage (string $message)
 string __toString ()
Variables
int $_code (line 52)

Fault code

  • access: protected
string $_encoding = 'UTF-8' (line 58)

Fault character encoding

  • access: protected
array $_internal = array(
404 => 'Unknown Error',

// 610 - 619 reflection errors
610 => 'Invalid method class',
611 => 'Unable to attach function or callback; not callable',
612 => 'Unable to load array; not an array',
613 => 'One or more method records are corrupt or otherwise unusable',

// 620 - 629 dispatch errors
620 => 'Method does not exist',
621 => 'Error instantiating class to invoke method',
622 => 'Method missing implementation',
623 => 'Calling parameters do not match signature',

// 630 - 639 request errors
630 => 'Unable to read request',
631 => 'Failed to parse request',
632 => 'Invalid request, no method passed; request must contain a \'methodName\' tag',
633 => 'Param must contain a value',
634 => 'Invalid method name',
635 => 'Invalid XML provided to request',
636 => 'Error creating xmlrpc value',

// 640 - 649 system.* errors
640 => 'Method does not exist',

// 650 - 659 response errors
650 => 'Invalid XML provided for response',
651 => 'Failed to parse response',
652 => 'Invalid response',
653 => 'Invalid XMLRPC value in response',
)
(line 70)

Internal fault codes => messages

  • access: protected
string $_message (line 64)

Fault message

  • access: protected
Methods
static isFault (line 264)

Determine if an XML response is an XMLRPC fault

  • access: public
static boolean isFault (string $xml)
  • string $xml
Constructor __construct (line 109)

Constructor

  • access: public
Zend_XmlRpc_Fault __construct ([ $code = 404], [ $message = ''])
  • $code
  • $message

Redefined in descendants as:
getCode (line 139)

Return fault code

  • access: public
int getCode ()
getEncoding (line 183)

Retrieve current fault encoding

  • access: public
string getEncoding ()
getMessage (line 161)

Retrieve fault message

  • access: public
string getMessage ()
loadXml (line 197)

Load an XMLRPC fault from XML

  • return: Returns true if successfully loaded fault response, false if response was not a fault response
  • access: public
  • throws: Zend_XmlRpc_Exception if no or faulty XML provided, or if fault response does not contain either code or message
boolean loadXml (string $fault)
  • string $fault
saveXML (line 281)

Serialize fault to XML

  • access: public
string saveXML ()
setCode (line 128)

Set the fault code

  • access: public
Zend_XmlRpc_Fault setCode (int $code)
  • int $code
setEncoding (line 172)

Set encoding to use in fault response

  • access: public
Zend_XmlRpc_Fault setEncoding (string $encoding)
  • string $encoding
setMessage (line 150)

Retrieve fault message

  • access: public
Zend_XmlRpc_Fault setMessage (string $message)
  • string $message
__toString (line 306)

Return XML fault response

  • access: public
string __toString ()

Documentation generated on Thu, 18 Jan 2007 09:53:22 -0800 by phpDocumentor 1.3.1