File/lib/sl_iolib.php

Description

Sloodle input/output library.

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

Classes
Class Description
 class SloodleLSLResponse A helper class to validate and structure data for output according to the Sloodle communications specification.
 class SloodleLSLRequest Handles incoming HTTP requests, typically from LSL scripts.
Includes
 require_once (SLOODLE_DIRROOT.'/lib/sl_generallib.php') (line 22)

Include our general library.

Constants
SLOODLE_AUTH_FAILED = -1 (line 34)

Used to indicate that authentication has failed.

SLOODLE_AUTH_OK = 1 (line 30)

Used to indicate that authentication has been successful.

SLOODLE_AUTH_UNKNOWN = 0 (line 32)

Used to indicate that authentication has not yet been attempted.

SLOODLE_FIELD_SEPARATOR = "|" (line 27)

Defines what character(s) will be used to separate individual fields in the Sloodle communications specification.

SLOODLE_LINE_SEPARATOR = "\n" (line 25)

Defines what character(s) will be used to separate lines in the Sloodle communications specification.

Functions
sloodle_required_param (line 684)

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.
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 Tue, 04 Mar 2008 15:08:43 +0000 by phpDocumentor 1.4.0