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.

  • copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  • license: New BSD License

Located in /XmlRpc/Fault.php (line 42)


	
			
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 48)

Fault code

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

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 66)

Internal fault codes => messages

  • access: protected
string $_message (line 60)

Fault message

  • access: protected
Methods
static isFault (line 261)

Determine if an XML response is an XMLRPC fault

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

Constructor

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

Redefined in descendants as:
getCode (line 135)

Return fault code

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

Retrieve current fault encoding

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

Retrieve fault message

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

Load an XMLRPC fault from XML

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

Serialize fault to XML

  • access: public
string saveXml ()
setCode (line 124)

Set the fault code

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

Set encoding to use in fault response

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

Retrieve fault message

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

Return XML fault response

  • access: public
string __toString ()

Documentation generated on Mon, 21 Jun 2010 15:22:06 -0400 by phpDocumentor 1.4.3