Utility class to manage PHP time limit.
More...
|
static | get_and_clear_unit_test_data () |
| For unit testing, returns an array of the values set during test.
|
|
static | raise ($newlimit=0) |
| Sets the PHP time limit to a number of seconds from now.
|
|
|
static int | $currentend = -1 |
| Current end time of time limit (-1 if not set)
|
|
static array | $unittestdata = array() |
| Data for unit testing.
|
|
Utility class to manage PHP time limit.
◆ get_and_clear_unit_test_data()
static core_php_time_limit::get_and_clear_unit_test_data |
( |
| ) |
|
|
static |
For unit testing, returns an array of the values set during test.
- Return values
-
◆ raise()
static core_php_time_limit::raise |
( |
| $newlimit = 0 | ) |
|
|
static |
Sets the PHP time limit to a number of seconds from now.
This function will always extend the time limit (in other words, if the time limit has already been set further in the future, it will do nothing).
In order to support front-end servers which may time out silently if no output is displayed, you should ideally only call this function if you expect some output to be displayed at the same time. (I.e. if you call this function each time around a loop, also display some output each time around the loop, such as a progress bar update.)
- Parameters
-
int | $newlimit | Limit in seconds from now (0 = infinite) |
The documentation for this class was generated from the following file:
- lib/classes/php_time_limit.php