Moodle  2.2.1
http://www.collinsharper.com
mnet_xmlrpc_client Class Reference

Public Member Functions

 mnet_xmlrpc_client ()
 set_timeout ($timeout)
 set_method ($xmlrpcpath)
 add_param ($argument, $type= 'string')
 send ($mnet_peer)
 permission_to_call ($mnet_peer)
 prepare_http_request ($mnet_peer)

Data Fields

 $method = ''
 $params = array()
 $timeout = 60
 $error = array()
 $response = ''
 $mnet = null

Detailed Description

Class representing an XMLRPC request against a remote machine

Definition at line 16 of file client.php.


Member Function Documentation

add_param ( argument,
type = 'string' 
)

Add a parameter to the array of parameters.

Parameters:
string$argumentA transport ID, as defined in lib.php
string$typeThe 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
Returns:
bool True on success

Definition at line 89 of file client.php.

Constructor returns true

Definition at line 28 of file client.php.

Here is the call graph for this function:

permission_to_call ( mnet_peer)

Check that we are permitted to call method on specified peer

Parameters:
object$mnet_peerA mnet_peer object with details of the remote host we're connecting to
Returns:
bool True if we permit calls to method on specified peer, False otherwise.

Definition at line 313 of file client.php.

Here is the caller graph for this function:

prepare_http_request ( mnet_peer)

Generate a curl handle and prepare it for sending to an mnet host

Parameters:
object$mnet_peerA mnet_peer object with details of the remote host the request will be sent to
Returns:
cURL handle - the almost-ready-to-send http request

Definition at line 361 of file client.php.

Here is the caller graph for this function:

send ( mnet_peer)

Send the request to the server - decode and return the response

Parameters:
object$mnet_peerA mnet_peer object with details of the remote host we're connecting to
Returns:
mixed A PHP variable, as returned by the remote function

Definition at line 127 of file client.php.

Here is the call graph for this function:

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

Definition at line 59 of file client.php.

set_timeout ( timeout)

Allow users to override the default timeout

Parameters:
int$timeoutRequest timeout in seconds $return bool True if param is an integer or integer string

Definition at line 39 of file client.php.


Field Documentation

$error = array()

Definition at line 21 of file client.php.

$method = ''

Definition at line 18 of file client.php.

$mnet = null

Definition at line 23 of file client.php.

$params = array()

Definition at line 19 of file client.php.

$response = ''

Definition at line 22 of file client.php.

$timeout = 60

Definition at line 20 of file client.php.


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