Class representing an XMLRPC request against a remote machine.
More...
|
| $error = array() |
|
| $method = '' |
|
| $mnet = null |
|
| $params = array() |
|
| $response = '' |
|
| $timeout = 60 |
|
Class representing an XMLRPC request against a remote machine.
◆ add_param()
mnet_xmlrpc_client::add_param |
( |
|
$argument, |
|
|
|
$type = 'string' |
|
) |
| |
Add a parameter to the array of parameters.
- Parameters
-
string | $argument | A transport ID, as defined in lib.php |
string | $type | The argument type, can be one of: none empty base64 boolean datetime double int string array struct In its weakly-typed wisdom, PHP will (currently) ignore everything except datetime and base64 |
- Return values
-
◆ mnet_xmlrpc_client()
mnet_xmlrpc_client::mnet_xmlrpc_client |
( |
| ) |
|
Old syntax of class constructor.
Deprecated in PHP7.
- Deprecated:
- since Moodle 3.1
◆ permission_to_call()
mnet_xmlrpc_client::permission_to_call |
( |
|
$mnet_peer | ) |
|
Check that we are permitted to call method on specified peer.
- Parameters
-
object | $mnet_peer | A mnet_peer object with details of the remote host we're connecting to |
- Return values
-
bool | True if we permit calls to method on specified peer, False otherwise. |
◆ prepare_http_request()
mnet_xmlrpc_client::prepare_http_request |
( |
|
$mnet_peer | ) |
|
Generate a curl handle and prepare it for sending to an mnet host.
- Parameters
-
object | $mnet_peer | A mnet_peer object with details of the remote host the request will be sent to |
- Return values
-
cURL | handle - the almost-ready-to-send http request |
◆ send()
mnet_xmlrpc_client::send |
( |
|
$mnet_peer | ) |
|
Send the request to the server - decode and return the response.
- Parameters
-
object | $mnet_peer | A mnet_peer object with details of the remote host we're connecting to |
- Return values
-
mixed | A PHP variable, as returned by the remote function |
◆ set_method()
mnet_xmlrpc_client::set_method |
( |
|
$xmlrpcpath | ) |
|
Set the path to the method or function we want to execute on the remote machine.
Examples: mod/scorm/functionname auth/mnet/methodname In the case of auth and enrolment plugins, an object will be created and the method on that object will be called
◆ set_timeout()
mnet_xmlrpc_client::set_timeout |
( |
|
$timeout | ) |
|
Allow users to override the default timeout.
- Parameters
-
int | $timeout | Request timeout in seconds $return bool True if param is an integer or integer string |
The documentation for this class was generated from the following file: