ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
XML_RPC2_Backend_Php_Client Class Reference
+ Inheritance diagram for XML_RPC2_Backend_Php_Client:
+ Collaboration diagram for XML_RPC2_Backend_Php_Client:

Public Member Functions

 __construct ($uri, $options=array())
 Construct a new XML_RPC2_Client PHP Backend.
 remoteCall___ ($methodName, $parameters)
 remoteCall executes the XML-RPC call, and returns the result
- Public Member Functions inherited from XML_RPC2_Client
 __call ($methodName, $parameters)
 __call Catchall.

Additional Inherited Members

- Static Public Member Functions inherited from XML_RPC2_Client
static create ($uri, $options=array())
 Factory method to select, create and return a XML_RPC2_Client backend.
- Data Fields inherited from XML_RPC2_Client
const VERSION = '1.0.4'
- Protected Member Functions inherited from XML_RPC2_Client
 displayDebugInformations___ ($request, $body)
 Display debug informations.
 displayDebugInformations2___ ($result)
 Display debug informations (part 2)
 testMethodName___ ($methodName)
 Return true is the given method name is ok with XML/RPC spec.
- Protected Attributes inherited from XML_RPC2_Client
 $uri = null
 $proxy = null
 $prefix = null
 $debug = false
 $encoding = 'iso-8859-1'
 $sslverify = true
 $uglyStructHack = true
 ugly hack flag to avoid http://bugs.php.net/bug.php?id=21949

Detailed Description

Definition at line 64 of file Client.php.

Constructor & Destructor Documentation

XML_RPC2_Backend_Php_Client::__construct (   $uri,
  $options = array() 
)

Construct a new XML_RPC2_Client PHP Backend.

To create a new XML_RPC2_Client, a URI must be provided (e.g. http://xmlrpc.example.com/1.0/). Optionally, some options may be set

Parameters
stringURI for the XML-RPC server
array(optional) Associative array of options

Reimplemented from XML_RPC2_Client.

Definition at line 78 of file Client.php.

References XML_RPC2_Client\$uri.

{
}

Member Function Documentation

XML_RPC2_Backend_Php_Client::remoteCall___ (   $methodName,
  $parameters 
)

remoteCall executes the XML-RPC call, and returns the result

NB : The '___' at the end of the method name is to avoid collisions with XMLRPC __call()

Parameters
stringMethod name
arrayParameters

Reimplemented from XML_RPC2_Client.

Definition at line 95 of file Client.php.

References $result, XML_RPC2_Client\$uri, XML_RPC2_Backend_Php_Response\decode(), XML_RPC2_Client\displayDebugInformations2___(), and XML_RPC2_Client\displayDebugInformations___().

{
$request = new XML_RPC2_Backend_Php_Request($this->prefix . $methodName, $this->encoding);
$request->setParameters($parameters);
$request = $request->encode();
$options = array(
'encoding' => $this->encoding,
'proxy' => $this->proxy,
'sslverify' => $this->sslverify
);
$httpRequest = new XML_RPC2_Util_HTTPRequest($uri, $options);
$httpRequest->setPostData($request);
$httpRequest->sendRequest();
$body = $httpRequest->getBody();
if ($this->debug) {
$this->displayDebugInformations___($request, $body);
}
try {
$result = XML_RPC2_Backend_Php_Response::decode(simplexml_load_string($body));
} catch (XML_RPC2_Exception $e) {
if ($this->debug) {
if (get_class($e)=='XML_RPC2_FaultException') {
print "XML_RPC2_FaultException #" . $e->getFaultCode() . " : " . $e->getMessage();
} else {
print get_class($e) . " : " . $e->getMessage();
}
}
throw $e;
}
if ($this->debug) {
}
return $result;
}

+ Here is the call graph for this function:


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