ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
XML_RPC2_Backend Class Reference
+ Collaboration diagram for XML_RPC2_Backend:

Static Public Member Functions

static setBackend ($backend)
 Backend setter.
static getServerClassname ()
 Include the relevant php files for the server class, and return the backend server class name.
static getClientClassname ()
 Include the relevant php files for the client class, and return the backend client class name.
static getValueClassname ()
 Include the relevant php files for the value class, and return the backend value class name.

Static Protected Member Functions

static getBackend ()
 Backend getter.

Static Protected Attributes

static $currentBackend

Detailed Description

Definition at line 70 of file Backend.php.

Member Function Documentation

static XML_RPC2_Backend::getBackend ( )
staticprotected

Backend getter.

Return the current backend name. If no backend was previously selected select one and set it.

The xmlrpcext backend is preferred, and will be automatically selected when no explicit backend has been set and the xmlrpc extension exists. If it does not exist, then the php backend is selected.

Returns
string The current backend

Definition at line 135 of file Backend.php.

References $currentBackend, and setBackend().

{
if (!isset(self::$currentBackend)) {
try {
self::setBackend('XMLRPCext'); // We prefer this one
} catch (XML_RPC2_Exception $e) {
// TODO According to PEAR CG logging should occur here
self::setBackend('php'); // But will settle with this one in case of error
}
}
}

+ Here is the call graph for this function:

static XML_RPC2_Backend::getClientClassname ( )
static

Include the relevant php files for the client class, and return the backend client class name.

Returns
string The Client class name

Definition at line 171 of file Backend.php.

Referenced by XML_RPC2_Client\create().

{
require_once(sprintf('XML/RPC2/Backend/%s/Client.php', self::getBackend()));
return sprintf('XML_RPC2_Backend_%s_Client', self::getBackend());
}

+ Here is the caller graph for this function:

static XML_RPC2_Backend::getServerClassname ( )
static

Include the relevant php files for the server class, and return the backend server class name.

Returns
string The Server class name

Definition at line 157 of file Backend.php.

Referenced by XML_RPC2_Server\create().

{
require_once(sprintf('XML/RPC2/Backend/%s/Server.php', self::getBackend()));
return sprintf('XML_RPC2_Backend_%s_Server', self::getBackend());
}

+ Here is the caller graph for this function:

static XML_RPC2_Backend::getValueClassname ( )
static

Include the relevant php files for the value class, and return the backend value class name.

Returns
string The Value class name

Definition at line 185 of file Backend.php.

Referenced by XML_RPC2_Value\createFromNative().

{
require_once(sprintf('XML/RPC2/Backend/%s/Value.php', self::getBackend()));
return sprintf('XML_RPC2_Backend_%s_Value', self::getBackend());
}

+ Here is the caller graph for this function:

static XML_RPC2_Backend::setBackend (   $backend)
static

Backend setter.

Currently, two backends exist: 'php' and 'XMLRPCext'. The PHP backend has no external dependencies, while the xmlrpcext requires the xmlrpc extension.

The XMLRPCext backend is quite faster, and will be automatically selected when no explicit backend has been set and the extension is available.

Parameters
stringThe backend to select. Either 'php' or 'XMLRPCext'.

Definition at line 98 of file Backend.php.

Referenced by XML_RPC2_Server\create(), XML_RPC2_Client\create(), and getBackend().

{
$backend = ucfirst(strtolower($backend));
if (
$backend != 'Php' &&
$backend != 'Xmlrpcext'
) {
throw new XML_RPC2_Exception(sprintf('Backend %s does not exist', $backend));
}
if (
$backend == 'Xmlrpcext' &&
!function_exists('xmlrpc_server_create') &&
!( // TODO Use PEAR::loadExtension once PEAR passes PHP5 unit tests (E_STRICT compliance, namely)
@dl('php_xmlrpc' . PHP_SHLIB_SUFFIX) || @dl('xmlrpc' . PHP_SHLIB_SUFFIX)
)
) {
throw new XML_RPC2_Exception('Unable to load xmlrpc extension.');
}
self::$currentBackend = $backend;
}

+ Here is the caller graph for this function:

Field Documentation

XML_RPC2_Backend::$currentBackend
staticprotected

Definition at line 80 of file Backend.php.

Referenced by getBackend().


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