|
Revision 3211, 1.3 kB
(checked in by fabien, 6 years ago)
|
updated phpdoc for the debug/ directory
|
- Property svn:mime-type set to
text/x-php
- Property svn:eol-style set to
native
- Property svn:keywords set to
Id
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
class sfTimerManager |
|---|
| 20 |
{ |
|---|
| 21 |
static public $timers = array(); |
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
* Gets a sfTimer instance. |
|---|
| 25 |
* |
|---|
| 26 |
* It returns the timer named $name or create a new one if it does not exist. |
|---|
| 27 |
* |
|---|
| 28 |
* @param string The name of the timer |
|---|
| 29 |
* |
|---|
| 30 |
* @return sfTimer The timer instance |
|---|
| 31 |
*/ |
|---|
| 32 |
public static function getTimer($name) |
|---|
| 33 |
{ |
|---|
| 34 |
if (!isset(self::$timers[$name])) |
|---|
| 35 |
{ |
|---|
| 36 |
self::$timers[$name] = new sfTimer($name); |
|---|
| 37 |
} |
|---|
| 38 |
|
|---|
| 39 |
self::$timers[$name]->startTimer(); |
|---|
| 40 |
|
|---|
| 41 |
return self::$timers[$name]; |
|---|
| 42 |
} |
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 |
* Gets all sfTimer instances stored in sfTimerManager. |
|---|
| 46 |
* |
|---|
| 47 |
* @return array An array of all sfTimer instances |
|---|
| 48 |
*/ |
|---|
| 49 |
public static function getTimers() |
|---|
| 50 |
{ |
|---|
| 51 |
return self::$timers; |
|---|
| 52 |
} |
|---|
| 53 |
|
|---|
| 54 |
|
|---|
| 55 |
* Clears all sfTimer instances stored in sfTimerManager. |
|---|
| 56 |
*/ |
|---|
| 57 |
public static function clearTimers() |
|---|
| 58 |
{ |
|---|
| 59 |
self::$timers = array(); |
|---|
| 60 |
} |
|---|
| 61 |
} |
|---|
| 62 |
|
|---|