TeamSpeak 3 PHP Framework
Modern use-at-will framework that provides individual components to manage TeamSpeak 3 Server instances
TeamSpeak3_Helper_Profiler Class Reference

Helper class for profiler handling. More...

Static Public Member Functions

static get ($name="default")
 Returns a timer. More...
 
static init ($name="default")
 Inits a timer. More...
 
static start ($name="default")
 Starts a timer. More...
 
static stop ($name="default")
 Stops a timer. More...
 

Detailed Description

Helper class for profiler handling.

Member Function Documentation

◆ get()

static get (   $name = "default")
static

Returns a timer.

Parameters
string$name
Returns
TeamSpeak3_Helper_Profiler_Timer
90  {
91  if(!array_key_exists($name, self::$timers))
92  {
93  self::init($name);
94  }
95 
96  return self::$timers[$name];
97  }

◆ init()

static init (   $name = "default")
static

Inits a timer.

Parameters
string$name
Returns
void
45  {
46  self::$timers[$name] = new TeamSpeak3_Helper_Profiler_Timer($name);
47  }
Helper class providing profiler timers.
Definition: Timer.php:29

◆ start()

static start (   $name = "default")
static

Starts a timer.

Parameters
string$name
Returns
void
56  {
57  if(array_key_exists($name, self::$timers))
58  {
59  self::$timers[$name]->start();
60  }
61  else
62  {
63  self::$timers[$name] = new TeamSpeak3_Helper_Profiler_Timer($name);
64  }
65  }
Helper class providing profiler timers.
Definition: Timer.php:29

◆ stop()

static stop (   $name = "default")
static

Stops a timer.

Parameters
string$name
Returns
void
74  {
75  if(!array_key_exists($name, self::$timers))
76  {
77  self::init($name);
78  }
79 
80  self::$timers[$name]->stop();
81  }

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