|
Moodle
2.2.1
http://www.collinsharper.com
|

Static Public Member Functions | |
| static | set_context_restriction ($context) |
| static | set_timeout ($seconds=360) |
| static | validate_parameters (external_description $description, $params) |
| static | clean_returnvalue (external_description $description, $response) |
Static Protected Member Functions | |
| static | validate_context ($context) |
Base class for external api methods.
Definition at line 116 of file externallib.php.
| static clean_returnvalue | ( | external_description $ | description, |
| $ | response | ||
| ) | [static] |
Clean response If a response attribute is unknown from the description, we just ignore the attribute. If a response attribute is incorrect, invalid_response_exception is thrown. Note: this function is similar to validate parameters, however it is distinct because parameters validation must be distinct from cleaning return values.
| external_description | $description | description of the return values |
| mixed | $response | the actual response |
Definition at line 227 of file externallib.php.


| static set_context_restriction | ( | $ | context | ) | [static] |
Set context restriction for all following subsequent function calls.
| stdClass | $contex |
Definition at line 124 of file externallib.php.

| static set_timeout | ( | $ | seconds = 360 | ) | [static] |
This method has to be called before every operation that takes a longer time to finish!
| int | $seconds | max expected time the next operation needs |
Definition at line 135 of file externallib.php.

| static validate_context | ( | $ | context | ) | [static, protected] |
Makes sure user may execute functions in this context.
| object | $context |
Definition at line 303 of file externallib.php.


| static validate_parameters | ( | external_description $ | description, |
| $ | params | ||
| ) | [static] |
Validates submitted function parameters, if anything is incorrect invalid_parameter_exception is thrown. This is a simple recursive method which is intended to be called from each implementation method of external API.
| external_description | $description | description of parameters |
| mixed | $params | the actual parameters |
Definition at line 149 of file externallib.php.

