File/lib/io.php

Description

Sloodle input/output library.

Provides general request and response functionality for interacting with in-world LSL scripts.

Classes
Class Description
 class SloodleResponse A helper class to validate and structure data for output according to the Sloodle communications specification.
 class SloodleRequest Handles incoming HTTP requests, typically from LSL if dealing with Second Life.
Includes
 require_once (SLOODLE_DIRROOT.'/lib/general.php') (line 22)

Include our general library.

Constants
SLOODLE_PARAM_AVATAR_NAME = 'sloodleavname' (line 36)

Defines the HTTP parameter name for an avatar name.

SLOODLE_PARAM_AVATAR_UUID = 'sloodleuuid' (line 34)

Defines the HTTP parameter name for an avatar UUID.

SLOODLE_PARAM_CONTROLLER_ID = 'sloodlecontrollerid' (line 30)

Defines the HTTP parameter name for a Sloodle controller ID.

SLOODLE_PARAM_COURSE_ID = 'sloodlecourseid' (line 28)

Defines the HTTP parameter name for a course ID.

SLOODLE_PARAM_IS_OBJECT = 'sloodleisobject' (line 41)

Defines the HTTP parameter name for indicating a request which relates to an object instead of a user.

SLOODLE_PARAM_MODULE_ID = 'sloodlemoduleid' (line 32)

Defines the HTTP parameter name for a module ID.

SLOODLE_PARAM_PASSWORD = 'sloodlepwd' (line 26)

Defines the HTTP parameter name for a Sloodle password.

SLOODLE_PARAM_REQUEST_DESC = 'sloodlerequestdesc' (line 39)

Defines the HTTP parameter name for a request descriptor.

SLOODLE_PARAM_SERVER_ACCESS_LEVEL = 'sloodleserveraccesslevel' (line 43)

Defines the HTTP parameter name for specifying server access level.

Functions
sloodle_required_param (line 744)

Obtains a named HTTP request parameter, and terminates script with an error message if it was not provided.

This is a 'Sloodle-friendly' version of the Moodle "required_param" function. Instead of terminate the script with an HTML-formatted error message, it will terminate with a message which conforms for the Sloodle communications specification, making it suitable for use in linker scripts.

  • return: The appropriately parsed and/or cleaned parameter value, if it was found.
  • deprecated:
mixed sloodle_required_param (string $parname, int $type)
  • string $parname: Name of the HTTP request parameter to fetch.
  • int $type: Type of parameter expected, such as "PARAM_RAW". See Moodle documentation for a complete list.

Documentation generated on Fri, 17 Jul 2009 11:01:24 +0100 by phpDocumentor 1.4.0