ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
XML_RPC2_FaultException Class Reference
+ Inheritance diagram for XML_RPC2_FaultException:
+ Collaboration diagram for XML_RPC2_FaultException:

Public Member Functions

 __construct ($messageString, $faultCode)
 Construct a new XML_RPC2_FaultException with a given message string and fault code.
 getFaultCode ()
 FaultCode getter.
 getFaultString ()
 FaultString getter.

Static Public Member Functions

static createFromDecode ($xml)
 Create a XML_RPC2_FaultException by decoding the corresponding xml string.

Protected Attributes

 $faultCode = null

Detailed Description

Definition at line 195 of file Exception.php.

Constructor & Destructor Documentation

XML_RPC2_FaultException::__construct (   $messageString,
  $faultCode 
)

Construct a new XML_RPC2_FaultException with a given message string and fault code.

Parameters
stringThe message string, corresponding to the faultString present in the response body
stringThe fault code, corresponding to the faultCode in the response body

Definition at line 215 of file Exception.php.

References $faultCode.

{
parent::__construct($messageString);
$this->faultCode = $faultCode;
}

Member Function Documentation

static XML_RPC2_FaultException::createFromDecode (   $xml)
static

Create a XML_RPC2_FaultException by decoding the corresponding xml string.

Parameters
string$xml
Returns
object a XML_RPC2_FaultException

Definition at line 258 of file Exception.php.

Referenced by XML_RPC2_Backend_Php_Response\decode().

{
require_once 'XML/RPC2/Backend/Php/Value.php';
// This is the only way I know of creating a new Document rooted in the provided simpleXMLFragment (needed for the xpath expressions that does not segfault sometimes
$xml = simplexml_load_string($xml->asXML());
$struct = XML_RPC2_Backend_Php_Value::createFromDecode($xml->value)->getNativeValue();
if (!(is_array($struct) &&
array_key_exists('faultString', $struct) &&
array_key_exists('faultCode', $struct))) throw new XML_RPC2_DecodeException('Unable to decode XML-RPC fault payload');
return new XML_RPC2_FaultException( $struct['faultString'], $struct['faultCode'] );
}

+ Here is the caller graph for this function:

XML_RPC2_FaultException::getFaultCode ( )

FaultCode getter.

Returns
string fault code

Definition at line 229 of file Exception.php.

References $faultCode.

Referenced by XML_RPC2_Backend_Php_Server\getResponse(), and XML_RPC2_Backend_Xmlrpcext_Server\getResponse().

{
}

+ Here is the caller graph for this function:

XML_RPC2_FaultException::getFaultString ( )

FaultString getter.

This is an alias to getMessage() in order to respect XML-RPC nomenclature for faults

Returns
string fault code

Definition at line 244 of file Exception.php.

{
return $this->getMessage();
}

Field Documentation

XML_RPC2_FaultException::$faultCode = null
protected

Definition at line 205 of file Exception.php.

Referenced by __construct(), and getFaultCode().


The documentation for this class was generated from the following file: