PHP Class XR_CcClient

Show file Open project: sourcefabric/newscoop

Public Properties

Property Type Description
$client XMLRPC client object reference
$debug XMLRPC debug flag
$mdefs Array with methods description
$verbose Verbosity flag

Public Methods

Method Description
Factory ( $mdefs, $debug, $verbose = FALSE ) : object, Factory, create object instance
XR_CcClient ( $mdefs, $debug, $verbose = FALSE ) : this Constructor - pelase DON'T CALL IT, use factory method instead
callMethod ( $method, $gettedPars ) : array, XMLRPC methods wrapper Encode XMLRPC request message, send it, receive and decode response.
ping ( $sessid = null ) : boolean | PEAR_Error Test whether the Campcaster server is reachable or not Uses xr_getVersion() to check communication and xr_loadPref to validate the session id

Method Details

Factory() public static method

In fact it doesn't create instance of XR_CcClient, but dynamically extend this class with set of methods based on $mdefs array (using eval function) and instantiate resulting class XR_CcClientCore instead. Each new method in this subclass accepts parameters according to $mdefs array, call wrapper callMethod(methodname, parameters) and return its result.
public static Factory ( $mdefs, $debug, $verbose = FALSE ) : object,
return object,

XR_CcClient() public method

@param mdefs array, hash array with methods description
public XR_CcClient ( $mdefs, $debug, $verbose = FALSE ) : this
return this

callMethod() public method

@param method string, method name
public callMethod ( $method, $gettedPars ) : array,
return array,

ping() public method

Test whether the Campcaster server is reachable or not Uses xr_getVersion() to check communication and xr_loadPref to validate the session id
public ping ( $sessid = null ) : boolean | PEAR_Error
return boolean | PEAR_Error TRUE on success, PEAR_Error on failure

Property Details

$client public property

XMLRPC client object reference
public $client

$debug public property

XMLRPC debug flag
public $debug

$mdefs public property

Array with methods description
public $mdefs

$verbose public property

Verbosity flag
public $verbose