Go to the source code of this file.
Data Structures |
| class | mnet_server_exception |
Functions |
| | mnet_server_strip_encryption ($HTTP_RAW_POST_DATA) |
| | mnet_server_strip_signature ($plaintextmessage) |
| | mnet_server_fault ($code, $text, $param=null) |
| | mnet_server_fault_xml ($code, $text, $privatekey=null) |
| | mnet_server_prepare_response ($response, $privatekey=null) |
| | mnet_server_dispatch ($payload) |
| | mnet_system ($method, $params, $hostinfo) |
| | mnet_server_invoke_plugin_method ($method, $callstack, $rpcrecord, $payload) |
| | mnet_server_invoke_dangerous_method ($includefile, $methodname, $method, $payload) |
| | mnet_keyswap ($function, $params) |
| | mnet_verify_permissions ($rpcrecord) |
| | mnet_setup_dummy_method ($method, $callstack, $rpcrecord) |
| | mnet_server_dummy_method ($methodname, $argsarray, $functionname) |
Function Documentation
Accepts a public key from a new remote host and returns the public key for this host. If 'register all hosts' is turned on, it will bootstrap a record for the remote host in the mnet_host table (if it's not already there)
- Parameters:
-
| string | $function | XML-RPC requires this but we don't... discard! |
| array | $params | Array of parameters $params[0] is the remote wwwroot $params[1] is the remote public key |
- Returns:
- string The XML-RPC response
Definition at line 526 of file serverlib.php.
If security checks are passed, dispatch the request to the function/method
The config variable 'mnet_dispatcher_mode' can be: strict: Only execute functions that are in specific files off: The default - don't execute anything
- Parameters:
-
| string | $payload | The XML-RPC request |
- Exceptions:
-
- Returns:
- No return val - just echo the response
What has the site administrator chosen as his dispatcher setting? strict: Only execute functions that are in specific files off: The default - don't execute anything
Definition at line 248 of file serverlib.php.
Dummy function for the XML-RPC dispatcher - use to call a method on an object or to call a function
Translate XML-RPC's strange function call syntax into a more straightforward PHP-friendly alternative. This dummy function will be called by the dispatcher, and can be used to call a method on an object, or just a function
The methodName argument (eg. mnet/testlib/mnet_concatenate_strings) is ignored.
- Exceptions:
-
- Parameters:
-
| string | $methodname | We discard this - see 'functionname' |
| array | $argsarray | Each element is an argument to the real function |
| string | $functionname | The name of the PHP function you want to call |
- Returns:
- mixed The return value will be that of the real function, whatever it may be.
Definition at line 647 of file serverlib.php.
Return the proper XML-RPC content to report an error in the local language.
- Parameters:
-
| int | $code | The ID code of the error message |
| string | $text | The full string of the error message (get_string will not be called) |
| string | $param | The $a param for the error message in the lang file |
- Returns:
- string $text The text of the error message
Definition at line 167 of file serverlib.php.
Return the proper XML-RPC content to report an error.
- Parameters:
-
| int | $code | The ID code of the error message |
| string | $text | The error message |
| resource | $privatekey | The private key that should be used to sign the response |
- Returns:
- string $text The XML text of the error message
Definition at line 183 of file serverlib.php.
Initialize the object (if necessary), execute the method or function, and return the response
- Parameters:
-
| string | $includefile | The file that contains the object definition |
| string | $methodname | The name of the method to execute |
| string | $method | The full path to the method |
| string | $payload | The XML-RPC request payload |
| string | $class | The name of the class to instantiate (or false) |
- Exceptions:
-
- Returns:
- string The XML-RPC response
Definition at line 489 of file serverlib.php.
Invoke a normal style plugin method This will verify permissions first.
- Parameters:
-
| string | $method | the full xmlrpc method that was called eg auth/mnet/auth.php/user_authorise |
| array | $callstack | the exploded callstack |
| stdclass | $rpcrecord | the record from mnet_rpc |
- Returns:
- mixed the response from the invoked method
Definition at line 463 of file serverlib.php.
Package a response in any required envelope, and return it to the client
- Parameters:
-
| string | $response | The XMLRPC response string |
| resource | $privatekey | The private key to sign the response with |
- Returns:
- string The encoded response string
Definition at line 222 of file serverlib.php.
-----XML-Envelope--------------------------------- | | | Encrypted-Symmetric-key---------------- | | |_____________________________________| | | | | Encrypted data------------------------- | | | | | | | -XML-Envelope------------------ | | | | | | | | | | | --Signature------------- | | | | | | |______________________| | | | | | | | | | | | | --Signed-Payload-------- | | | | | | | | | | | | | | | XML-RPC Request | | | | | | | |______________________| | | | | | | | | | | | |_____________________________| | | | |_____________________________________| | | | |________________________________________________|
Definition at line 36 of file serverlib.php.
Figure out exactly what needs to be called and stashes it in $remoteclient Does some further verification that the method is callable
- Parameters:
-
| string | $method | the full xmlrpc method that was called eg auth/mnet/auth.php/user_authorise |
| array | $callstack | the exploded callstack |
| stdclass | $rpcrecord | the record from mnet_rpc |
- Exceptions:
-
Definition at line 588 of file serverlib.php.
Execute the system functions - mostly for introspection
- Parameters:
-
| string | $method | XMLRPC method name, e.g. system.listMethods |
| array | $params | Array of parameters from the XMLRPC request |
| string | $hostinfo | Hostinfo object from the mnet_host table |
- Exceptions:
-
- Returns:
- mixed Response data - any kind of PHP variable
Definition at line 358 of file serverlib.php.
Verify that the requested xmlrpc method can be called This just checks the method exists in the rpc table and is enabled.
- Parameters:
-
| stdclass | $rpcrecord | the record from mnet_rpc |
- Exceptions:
-
Definition at line 550 of file serverlib.php.