Moodle  2.2.1
http://www.collinsharper.com
Zend_XmlRpc_Server Class Reference
Inheritance diagram for Zend_XmlRpc_Server:
Collaboration diagram for Zend_XmlRpc_Server:

Public Member Functions

 __construct ()
 __call ($method, $params)
 addFunction ($function, $namespace= '')
 setClass ($class, $namespace= '', $argv=null)
 fault ($fault=null, $code=404)
 handle ($request=false)
 loadFunctions ($definition)
 setEncoding ($encoding)
 getEncoding ()
 setPersistence ($mode)
 setRequest ($request)
 getRequest ()
 setResponseClass ($class)
 getResponseClass ()
 getDispatchTable ()
 getFunctions ()
 getSystem ()
 sendArgumentsToAllMethods ($flag=null)

Protected Member Functions

 _fixType ($type)
 _handle (Zend_XmlRpc_Request $request)
 _registerSystemMethods ()

Protected Attributes

 $_encoding = 'UTF-8'
 $_request = null
 $_responseClass = 'Zend_XmlRpc_Response_Http'
 $_table
 $_typeMap
 $_sendArgumentsToAllMethods = true

Detailed Description

Definition at line 117 of file Server.php.


Constructor & Destructor Documentation

Constructor

Creates system.* methods.

Returns:
void

Reimplemented from Zend_Server_Abstract.

Definition at line 193 of file Server.php.

Here is the call graph for this function:


Member Function Documentation

__call ( method,
params 
)

Proxy calls to system object

Parameters:
string$method
array$params
Returns:
mixed
Exceptions:
Zend_XmlRpc_Server_Exception

Definition at line 207 of file Server.php.

Here is the call graph for this function:

_fixType ( type) [protected]

Map PHP type to XML-RPC type

Parameters:
string$type
Returns:
string

Reimplemented from Zend_Server_Abstract.

Definition at line 539 of file Server.php.

_handle ( Zend_XmlRpc_Request request) [protected]

Handle an xmlrpc call (actual work)

Parameters:
Zend_XmlRpc_Request$request
Returns:
Zend_XmlRpc_Response
Exceptions:
Zend_XmlRpcServer_Exception|ExceptionZend_XmlRpcServer_Exceptions are thrown for internal errors; otherwise, any other exception may be thrown by the callback

Definition at line 556 of file Server.php.

Here is the call graph for this function:

Here is the caller graph for this function:

_registerSystemMethods ( ) [protected]

Register system methods with the server

Returns:
void

Definition at line 609 of file Server.php.

Here is the call graph for this function:

Here is the caller graph for this function:

addFunction ( function,
namespace = '' 
)

Attach a callback as an XMLRPC method

Attaches a callback as an XMLRPC method, prefixing the XMLRPC method name with $namespace, if provided. Reflection is done on the callback's docblock to create the methodHelp for the XMLRPC method.

Additional arguments to pass to the function at dispatch may be passed; any arguments following the namespace will be aggregated and passed at dispatch time.

Parameters:
string | array$functionValid callback
string$namespaceOptional namespace prefix
Returns:
void
Exceptions:
Zend_XmlRpc_Server_Exception

Implements Zend_Server_Interface.

Definition at line 233 of file Server.php.

Here is the call graph for this function:

fault ( fault = null,
code = 404 
)

Raise an xmlrpc server fault

Parameters:
string | Exception$fault
int$code
Returns:
Zend_XmlRpc_Server_Fault

Implements Zend_Server_Interface.

Reimplemented in moodle_zend_xmlrpc_server.

Definition at line 300 of file Server.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Retrieve dispatch table

Returns:
array

Definition at line 487 of file Server.php.

Retrieve current encoding

Returns:
string

Definition at line 404 of file Server.php.

Here is the caller graph for this function:

Returns a list of registered methods

Returns an array of dispatchables (Zend_Server_Reflection_Function, _Method, and _Class items).

Returns:
array

Reimplemented from Zend_Server_Abstract.

Definition at line 500 of file Server.php.

Return currently registered request object

Returns:
null|Zend_XmlRpc_Request

Definition at line 449 of file Server.php.

Here is the caller graph for this function:

Retrieve current response class

Returns:
string

Definition at line 477 of file Server.php.

Here is the caller graph for this function:

getSystem ( )

Retrieve system object

Returns:
Zend_XmlRpc_Server_System

Definition at line 510 of file Server.php.

Here is the caller graph for this function:

handle ( request = false)

Handle an xmlrpc call

Parameters:
Zend_XmlRpc_Request$requestOptional
Returns:
Zend_XmlRpc_Response|Zend_XmlRpc_Fault

Implements Zend_Server_Interface.

Definition at line 320 of file Server.php.

Here is the call graph for this function:

loadFunctions ( definition)

Load methods as returned from getFunctions

Typically, you will not use this method; it will be called using the results pulled from Zend_XmlRpc_Server_Cache::get().

Parameters:
array | Zend_Server_Definition$definition
Returns:
void
Exceptions:
Zend_XmlRpc_Server_Exceptionon invalid input

Implements Zend_Server_Interface.

Definition at line 359 of file Server.php.

Here is the call graph for this function:

sendArgumentsToAllMethods ( flag = null)

Send arguments to all methods?

If setClass() is used to add classes to the server, this flag defined how to handle arguments. If set to true, all methods including constructor will receive the arguments. If set to false, only constructor will receive the arguments

Definition at line 523 of file Server.php.

Here is the caller graph for this function:

setClass ( class,
namespace = '',
argv = null 
)

Attach class methods as XMLRPC method handlers

$class may be either a class name or an object. Reflection is done on the class or object to determine the available public methods, and each is attached to the server as an available method; if a $namespace has been provided, that namespace is used to prefix the XMLRPC method names.

Any additional arguments beyond $namespace will be passed to a method at invocation.

Parameters:
string | object$class
string$namespaceOptional
mixed$argvOptional arguments to pass to methods
Returns:
void
Exceptions:
Zend_XmlRpc_Server_Exceptionon invalid input

Implements Zend_Server_Interface.

Definition at line 274 of file Server.php.

Here is the call graph for this function:

Here is the caller graph for this function:

setEncoding ( encoding)

Set encoding

Parameters:
string$encoding
Returns:
Zend_XmlRpc_Server

Definition at line 392 of file Server.php.

setPersistence ( mode)

Do nothing; persistence is handled via Zend_XmlRpc_Server_Cache

Parameters:
mixed$mode
Returns:
void

Implements Zend_Server_Interface.

Definition at line 415 of file Server.php.

setRequest ( request)

Set the request object

Parameters:
string | Zend_XmlRpc_Request$request
Returns:
Zend_XmlRpc_Server
Exceptions:
Zend_XmlRpc_Server_Exceptionon invalid request class or object

Definition at line 426 of file Server.php.

Here is the call graph for this function:

Here is the caller graph for this function:

setResponseClass ( class)

Set the class to use for the response

Parameters:
string$class
Returns:
boolean True if class was set, false if not

Definition at line 460 of file Server.php.


Field Documentation

$_encoding = 'UTF-8' [protected]

Definition at line 123 of file Server.php.

$_request = null [protected]

Definition at line 129 of file Server.php.

$_responseClass = 'Zend_XmlRpc_Response_Http' [protected]

Definition at line 135 of file Server.php.

$_sendArgumentsToAllMethods = true [protected]

Definition at line 184 of file Server.php.

$_table [protected]

Reimplemented from Zend_Server_Abstract.

Definition at line 141 of file Server.php.

$_typeMap [protected]

Definition at line 147 of file Server.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations