IP.Board  3.3.0
IPSDebug Class Reference

Static Public Member Functions

static addLogMessage ($message, $file='debugLog', $array=FALSE, $force=FALSE, $unlink=FALSE)
static addMessage ($message)
static endTimer ()
static endTimerInstance ($startTime=0)
static errorHandler ($errno, $errstr, $errfile, $errline)
static fireBug ($method, $parameters=array())
static getMemoryDebugFlag ()
static getMessages ()
static getServerLoad ()
static prettifyBackTrace ($debug)
static setMemoryDebugFlag ($comment, $init_usage=0)
static showTemplateError ($errorText, $evalCode)
static startTimer ()
static startTimerInstance ()

Static Public Attributes

static $memory_debug = array()

Static Protected Attributes

static $_messages = array()
static $_starttime

Detailed Description

IPSDebug

Only useful when developing


Member Function Documentation

static addLogMessage ( message,
file = 'debugLog',
array = FALSE,
force = FALSE,
unlink = FALSE 
) [static]

Add a message to the log file Handy for __destruct stuff, etc

Parameters:
stringMessage to add
stringWhich file to add it to
mixedFalse, or an array of vars to include in log
boolForce log even if IPS_LOG_ALL is off - handy for on-the-fly debugging
boolUnlink file before writing
Returns:
void
static addMessage ( message) [static]

Add message

Parameters:
string
Returns:
void
static endTimer ( ) [static]

Stop the timer

Returns:
integer Length of time
static endTimerInstance ( startTime = 0) [static]

Stop the timer (compare against provided time instead of stored time)

Parameters:
integerStart time
Returns:
integer Length of time
static errorHandler ( errno,
errstr,
errfile,
errline 
) [static]

Custom error handler

Parameters:
integerError number
stringError string
stringError file
stringError line number
Returns:
void
static fireBug ( method,
parameters = array() 
) [static]

Send a FirePHP message

Parameters:
string$methodMethod to call
string$varsParameters to pass
Returns:
void
See Also:
http://www.firephp.org/HQ/
static getMemoryDebugFlag ( ) [static]

Get current memory usage

Returns:
integer Current memory usage
static getMessages ( ) [static]

Return messages

Returns:
array Stored messages
static getServerLoad ( ) [static]

Retrieve server load and update cache if appropriate

Returns:
string Server load
static prettifyBackTrace ( debug) [static]

Prettify a debug backtrace

Parameters:
arrayData from backtrace
Returns:
string
static setMemoryDebugFlag ( comment,
init_usage = 0 
) [static]

Set a memory debug flag

Parameters:
stringComment to set
integerMemory usage to compare against
Returns:
int Memory used
static showTemplateError ( errorText,
evalCode 
) [static]

Displays a templating error Only used when IN_DEV is on

Parameters:
stringComplete PHP error string
stringText evaluated by PHP
Returns:
void
static startTimer ( ) [static]

Start a timer

Returns:
void
static startTimerInstance ( ) [static]

Start a timer (return value instead of storing locally)

Returns:
integer Time

The documentation for this class was generated from the following file:
 All Data Structures Functions Variables