XOOPS  2.6.0
Xmf\Debug Class Reference

Static Public Member Functions

static backtrace ($inline=false)
 
static dump ($var, $inline=false)
 
static dumpQueuedTimers ($returnOnly=false)
 
static startQueuedTimer ($name, $label=null)
 
static startTimer ($name, $label=null)
 
static startTrace ($tracefile= '', $collect_params= '3', $collect_return= 'On')
 
static stopQueuedTimer ($name)
 
static stopTimer ($name)
 
static stopTrace ()
 

Static Private Attributes

static $timerLabels = array()
 
static $timerQueue = array()
 
static $times = array()
 

Detailed Description

Definition at line 27 of file Debug.php.

Member Function Documentation

static Xmf\Debug::backtrace (   $inline = false)
static

Display debug backtrace

Parameters
boolean$inlineforce inline display if true, otherwise will attempt to use debug.log event
Returns
mixed|string

Definition at line 95 of file Debug.php.

References Xoops\getInstance().

Here is the call graph for this function:

static Xmf\Debug::dump (   $var,
  $inline = false 
)
static

Dump a variable

Parameters
mixed$varvariable which will be dumped
bool$inlineforce inline display if true, otherwise will attempt to use debug.log event
Returns
void

Definition at line 64 of file Debug.php.

References $config, $msg, $var, XoopsBaseConfig\get(), and Xoops\getInstance().

Here is the call graph for this function:

static Xmf\Debug::dumpQueuedTimers (   $returnOnly = false)
static

dump and queued timer data and reset the queue

Note: The DebugBar logger will add any unprocessed queue data to its timeline automatically, if you use queued timers and don't call this.

Parameters
boolean$returnOnlyif true do not dump queue, only return it
Returns
array of time data see ::$timerQueue

Definition at line 192 of file Debug.php.

Referenced by DebugbarLogger\__destruct().

Here is the caller graph for this function:

static Xmf\Debug::startQueuedTimer (   $name,
  $label = null 
)
static

Start a queued timer. Queued timers are stored and only dumped by request. This makes them useful in recording timing when immediate output is not possible practical, such as early system startup activities. Timers can be queued at any point once the Xmf class can be loaded then dumped when system facilities are available.

Parameters
string$nameunique name for timer
string | null$labeloptional label for this timer
Returns
void

Definition at line 157 of file Debug.php.

References $name.

static Xmf\Debug::startTimer (   $name,
  $label = null 
)
static

Start a timer

Parameters
string$nameunique name for timer
string | null$labeloptional label for this timer
Returns
void

Definition at line 114 of file Debug.php.

References $name, $var, and Xoops\getInstance().

Here is the call graph for this function:

static Xmf\Debug::startTrace (   $tracefile = '',
  $collect_params = '3',
  $collect_return = 'On' 
)
static

start_trace - turn on xdebug trace

Requires xdebug extension

Parameters
type$tracefilefile name for trace file
type$collect_paramsargument for ini_set('xdebug.collect_params',?) Controls display of parameters in trace output
type$collect_returnargument for ini_set('xdebug.collect_return',?) Controls display of function return value in trace
Returns
void

Definition at line 216 of file Debug.php.

References XoopsBaseConfig\get().

Here is the call graph for this function:

static Xmf\Debug::stopQueuedTimer (   $name)
static

Stop a queued timer

Parameters
string$nameunique name for timer
Returns
void

Definition at line 170 of file Debug.php.

References $name.

static Xmf\Debug::stopTimer (   $name)
static

Stop a timer

Parameters
string$nameunique name for timer
Returns
void

Definition at line 134 of file Debug.php.

References $name, and Xoops\getInstance().

Here is the call graph for this function:

static Xmf\Debug::stopTrace ( )
static

stop_trace - turn off xdebug trace

Requires xdebug extension

Returns
void

Definition at line 235 of file Debug.php.

Member Data Documentation

Xmf\Debug::$timerLabels = array()
staticprivate

Definition at line 52 of file Debug.php.

Xmf\Debug::$timerQueue = array()
staticprivate

Definition at line 44 of file Debug.php.

Xmf\Debug::$times = array()
staticprivate

Definition at line 35 of file Debug.php.


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