MediaWiki
REL1_22
|
Class to expand PHP execution time for a function call. More...
Public Member Functions | |
__construct ($seconds) | |
__destruct () | |
Restore the original timeout. | |
Public Attributes | |
const | MAX_TOTAL_CALLS = 1000000 |
const | MAX_TOTAL_TIME = 300 |
Protected Attributes | |
$oldIgnoreAbort | |
$oldTimeout | |
$startTime | |
Static Protected Attributes | |
static | $stackDepth = 0 |
static | $totalCalls = 0 |
static | $totalElapsed = 0 |
Class to expand PHP execution time for a function call.
Use this when performing changes that should not be interrupted.
On construction, set_time_limit() is called and set to $seconds. If the client aborts the connection, PHP will continue to run. When the object goes out of scope, the timer is restarted, with the original time limit minus the time the object existed.
Definition at line 32 of file ScopedPHPTimeout.php.
ScopedPHPTimeout::__construct | ( | $ | seconds | ) |
$seconds | integer |
Definition at line 48 of file ScopedPHPTimeout.php.
References $stackDepth, and $totalCalls.
Restore the original timeout.
This does not account for the timer value on __construct().
Definition at line 70 of file ScopedPHPTimeout.php.
References $stackDepth.
ScopedPHPTimeout::$oldIgnoreAbort [protected] |
Definition at line 35 of file ScopedPHPTimeout.php.
ScopedPHPTimeout::$oldTimeout [protected] |
Definition at line 34 of file ScopedPHPTimeout.php.
ScopedPHPTimeout::$stackDepth = 0 [static, protected] |
Definition at line 37 of file ScopedPHPTimeout.php.
Referenced by __construct(), and __destruct().
ScopedPHPTimeout::$startTime [protected] |
Definition at line 33 of file ScopedPHPTimeout.php.
ScopedPHPTimeout::$totalCalls = 0 [static, protected] |
Definition at line 38 of file ScopedPHPTimeout.php.
Referenced by __construct().
ScopedPHPTimeout::$totalElapsed = 0 [static, protected] |
Definition at line 39 of file ScopedPHPTimeout.php.
const ScopedPHPTimeout::MAX_TOTAL_CALLS = 1000000 |
Definition at line 42 of file ScopedPHPTimeout.php.
const ScopedPHPTimeout::MAX_TOTAL_TIME = 300 |
Definition at line 43 of file ScopedPHPTimeout.php.