MediaWiki  REL1_19
FileOpScopedPHPTimeout Class Reference

FileOp helper class to expand PHP execution time for a function. More...

List of all members.

Public Member Functions

 __construct ($seconds)
 __destruct ()
 Restore the original timeout.

Public Attributes

const MAX_TOTAL_CALLS = 1000000
const MAX_TOTAL_TIME = 300

Protected Attributes

 $oldTimeout
 $startTime

Static Protected Attributes

static $stackDepth = 0
static $totalCalls = 0
static $totalElapsed = 0

Detailed Description

FileOp helper class to expand PHP execution time for a function.

On construction, set_time_limit() is called and set to $seconds. 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 370 of file FileOp.php.


Constructor & Destructor Documentation

Parameters:
$secondsinteger

Definition at line 385 of file FileOp.php.

References $stackDepth, and $totalCalls.

Restore the original timeout.

This does not account for the timer value on __construct().

Definition at line 406 of file FileOp.php.

References $stackDepth.


Member Data Documentation

FileOpScopedPHPTimeout::$oldTimeout [protected]

Definition at line 372 of file FileOp.php.

FileOpScopedPHPTimeout::$stackDepth = 0 [static, protected]

Definition at line 374 of file FileOp.php.

Referenced by __construct(), and __destruct().

FileOpScopedPHPTimeout::$startTime [protected]

Definition at line 371 of file FileOp.php.

FileOpScopedPHPTimeout::$totalCalls = 0 [static, protected]

Definition at line 375 of file FileOp.php.

Referenced by __construct().

FileOpScopedPHPTimeout::$totalElapsed = 0 [static, protected]

Definition at line 376 of file FileOp.php.

Definition at line 379 of file FileOp.php.

Definition at line 380 of file FileOp.php.


The documentation for this class was generated from the following file: