|
Moodle
2.2.1
http://www.collinsharper.com
|


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 | |
Definition at line 117 of file Server.php.
| __construct | ( | ) |
Constructor
Creates system.* methods.
Reimplemented from Zend_Server_Abstract.
Definition at line 193 of file Server.php.

| __call | ( | $ | method, |
| $ | params | ||
| ) |
Proxy calls to system object
| string | $method | |
| array | $params |
| Zend_XmlRpc_Server_Exception |
Definition at line 207 of file Server.php.

| _fixType | ( | $ | type | ) | [protected] |
Map PHP type to XML-RPC type
| string | $type |
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)
| Zend_XmlRpc_Request | $request |
| Zend_XmlRpcServer_Exception|Exception | Zend_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.


| _registerSystemMethods | ( | ) | [protected] |
Register system methods with the server
Definition at line 609 of file Server.php.


| 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.
| string | array | $function | Valid callback |
| string | $namespace | Optional namespace prefix |
| Zend_XmlRpc_Server_Exception |
Implements Zend_Server_Interface.
Definition at line 233 of file Server.php.

| fault | ( | $ | fault = null, |
| $ | code = 404 |
||
| ) |
Raise an xmlrpc server fault
| string | Exception | $fault | |
| int | $code |
Implements Zend_Server_Interface.
Reimplemented in moodle_zend_xmlrpc_server.
Definition at line 300 of file Server.php.


| getDispatchTable | ( | ) |
| getEncoding | ( | ) |
Retrieve current encoding
Definition at line 404 of file Server.php.

| getFunctions | ( | ) |
Returns a list of registered methods
Returns an array of dispatchables (Zend_Server_Reflection_Function, _Method, and _Class items).
Reimplemented from Zend_Server_Abstract.
Definition at line 500 of file Server.php.
| getRequest | ( | ) |
Return currently registered request object
Definition at line 449 of file Server.php.

| getResponseClass | ( | ) |
Retrieve current response class
Definition at line 477 of file Server.php.

| getSystem | ( | ) |
Retrieve system object
Definition at line 510 of file Server.php.

| handle | ( | $ | request = false | ) |
Handle an xmlrpc call
| Zend_XmlRpc_Request | $request | Optional |
Implements Zend_Server_Interface.
Definition at line 320 of file Server.php.

| 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().
| array | Zend_Server_Definition | $definition |
| Zend_XmlRpc_Server_Exception | on invalid input |
Implements Zend_Server_Interface.
Definition at line 359 of file Server.php.

| 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.

| 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.
| string | object | $class | |
| string | $namespace | Optional |
| mixed | $argv | Optional arguments to pass to methods |
| Zend_XmlRpc_Server_Exception | on invalid input |
Implements Zend_Server_Interface.
Definition at line 274 of file Server.php.


| setEncoding | ( | $ | encoding | ) |
Set encoding
| string | $encoding |
Definition at line 392 of file Server.php.
| setPersistence | ( | $ | mode | ) |
Do nothing; persistence is handled via Zend_XmlRpc_Server_Cache
| mixed | $mode |
Implements Zend_Server_Interface.
Definition at line 415 of file Server.php.
| setRequest | ( | $ | request | ) |
Set the request object
| string | Zend_XmlRpc_Request | $request |
| Zend_XmlRpc_Server_Exception | on invalid request class or object |
Definition at line 426 of file Server.php.


| setResponseClass | ( | $ | class | ) |
Set the class to use for the response
| string | $class |
Definition at line 460 of file Server.php.
$_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.