MDL-12886 fixed param typo and adding new timeout method

This commit is contained in:
skodak
2009-10-07 21:44:54 +00:00
parent 13e40ad183
commit 2965d271d9
+13 -1
View File
@@ -48,10 +48,22 @@ class external_api {
* @param stdClass $contex
* @return void
*/
public static function set_context_restriction($contex) {
public static function set_context_restriction($context) {
self::$contextrestriction = $context;
}
/**
* This method has to be called before every operation
* that takes a longer time to finish!
*
* @param int $seconds max expected time the next operation needs
* @return void
*/
public static function set_timeout($seconds=360) {
$seconds = ($seconds < 300) ? 300 : $seconds;
set_time_limit($seconds);
}
/**
* Validates submitted function parameters, if anything is incorrect
* invalid_parameter_exception is thrown.