SloodleLSLRequestHandles incoming HTTP requests, typically from LSL scripts.
This class will perform much of the complex and repetitive processing required for handling HTTP requests.
Located in /lib/sl_iolib.php (line 708)
SloodleLSLRequest
SloodleLSLRequest
( &$response, &$user, SloodleLSLResponse $response, SloodleUser $user)
int
$auth_status
= SLOODLE_AUTH_UNKNOWN (line 737)
Indicates the status of request authentication.
mixed
$avatar_name
= NULL (line 767)
String name of the SL agent specified in the request (or NULL if not specified).
mixed
$avatar_uuid
= NULL (line 761)
String UUID of the SL user agent specified in the request (or NULL if not specified).
mixed
$course_id
= NULL (line 749)
Integer ID of the course specified in the request (or NULL if not specified).
mixed
$login_security_token
= NULL (line 773)
String containing the login security token specified in the request (or NULL if not specified).
mixed
$login_zone_pos
= NULL (line 743)
A 3-element array containing the LoginZone position vector specified in HTTP request parameters (or NULL if not specified).
mixed
$module_id
= NULL (line 755)
Integer ID of the course module instance specified in the request (or NULL if not specified).
mixed
$password
= NULL (line 726)
Contains the password specified in HTTP request parameters (or NULL if not specified).
bool
$request_data_processed
= FALSE (line 719)
Indicates whether or not the request data has been processed by the process_request_data() function.
SloodleLSLResponse
$response
= NULL (line 787)
The object used to output response data.
The object reference may be provided externally in the parameters of the constructor (SloodleLSLRequest()) or via the (set_response()) accessor. Otherwise, it will have been instantiated by this object itself.
SloodleUser
$user
= NULL (line 798)
The object used to store and process incoming user data.
The object reference may be provided externally in the parameters of the constructor (SloodleLSLRequest()) or via the (set_user()) accessor. Otherwise, it will have been instantiated by this object itself.
Constructor
If the parameters provide references to appropriate objects, then the constructor will store them. However, if the parameters are NULL, then the constructor will create its own instances.
Authenticates the request against the site using the password parameter.
This function can use both site-wide or object-specific prim passwords (the latter of which uses the 'sloodle_active_object' table in the database). It will also set the content of member {$link $auth_status} as appropriate.
Returns member value $avatar_name.
Note: this function will ensure that process_request_data() has already been called prior to execution.
Returns member value $avatar_uuid.
Note: this function will ensure that process_request_data() has already been called prior to execution.
Returns member value $course_id.
Note: this function will ensure that process_request_data() has already been called prior to execution.
Get a course module instance for the module specified in the request Uses the ID specified in $module_id.
Gets a database record for the course identified in the request.
(Note: this function does not check whether or not the user is enrolled in the course)
Returns member value $login_security_token.
Note: this function will ensure that process_request_data() has already been called prior to execution.
Returns member value $module_id.
Note: this function will ensure that process_request_data() has already been called prior to execution.
Returns member value $password.
Note: this function will ensure that process_request_data() has already been called prior to execution.
Returns member value $response.
Note: this function will ensure that process_request_data() has already been called prior to execution.
Returns member value $user.
Note: this function will ensure that process_request_data() has already been called prior to execution.
Indicates whether or not request authentication has succeeded.
Indicates whether or not request authentication has failed.
Returns member variable $request_data_processed.
Process all of the standard data provided by the HTTP request.
This function should normally be called very shortly after the start of a script, as it will check all the expected HTTP request parameters, perform basic processing, and store the data. It will also send data to the appropriate SloodleLSLResposne and SloodleUser objects. When called, it will check the $request_data_processed member to see if it has already been called. If so, it will not execute again, unless the $force parameter is TRUE. Note: most functions in this class will automatically call this function if needed to ensure data is available.
Obtains a named HTTP request parameter, and terminate with an error message if it has not been provided.
Note: for LSL linker scripts, this should *always* be used instead of the Moodle function, as this will render appropraitely formatted error messages, which LSL scripts can understand.
Sets the SloodleLSLRequest::$response member.
Sets the SloodleLSLRequest::$user member.
Documentation generated on Tue, 04 Mar 2008 15:08:45 +0000 by phpDocumentor 1.4.0