API - XOOPS 2.5.11 Beta 2
By monxoops.fr
XoopsLogger Class Reference
Inheritance diagram for XoopsLogger:

Public Member Functions

 __construct ()
 
 instance ()
 
 enableRendering ()
 
 microtime ()
 
 startTime ($name='XOOPS')
 
 stopTime ($name='XOOPS')
 
 addQuery ($sql, $error=null, $errno=null, $query_time=null)
 
 addBlock ($name, $cached=false, $cachetime=0)
 
 addExtra ($name, $msg)
 
 addDeprecated ($msg)
 
 handleError ($errno, $errstr, $errfile, $errline)
 
 handleException ($e)
 
 sanitizePath ($path)
 
 render ($output)
 
 dump ($mode='')
 
 dumpTime ($name='XOOPS', $unset=false)
 
 triggerError ($errkey=0, $errStr='', $errFile='', $errLine='', $errNo=0)
 
 dumpAll ()
 
 dumpBlocks ()
 
 dumpExtra ()
 
 dumpQueries ()
 

Static Public Member Functions

static getInstance ()
 

Data Fields

 $queries = array()
 
 $blocks = array()
 
 $extra = array()
 
 $logstart = array()
 
 $logend = array()
 
 $errors = array()
 
 $deprecated = array()
 
 $usePopup = false
 
 $activated = true
 
 $renderingEnabled = false
 

Protected Member Functions

 isThrowable ($e)
 

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Member Function Documentation

◆ addBlock()

addBlock (   $name,
  $cached = false,
  $cachetime = 0 
)

Log display of a block

Parameters
string$namename of the block
bool$cachedwas the block cached?
int$cachetimecachetime of the block

◆ addDeprecated()

addDeprecated (   $msg)

Log messages for deprecated functions

Deprecated:
Parameters
int$msgtext message for the entry

◆ addExtra()

addExtra (   $name,
  $msg 
)

Log extra information

Parameters
string$namename for the entry
int$msgtext message for the entry

◆ addQuery()

addQuery (   $sql,
  $error = null,
  $errno = null,
  $query_time = null 
)

Log a database query

Parameters
string$sqlSQL string
string$errorerror message (if any)
int$errnoerror number (if any)
null$query_time

◆ dump()

dump (   $mode = '')

*#+

Parameters
string$mode
Returns
Here is the caller graph for this function:

◆ dumpAll()

dumpAll ( )

*#+

Deprecated:
Here is the call graph for this function:

◆ dumpBlocks()

dumpBlocks ( )

dumpBlocks

Deprecated:
Returns
dump
Here is the call graph for this function:

◆ dumpExtra()

dumpExtra ( )

dumpExtra

Deprecated:
Returns
dump
Here is the call graph for this function:

◆ dumpQueries()

dumpQueries ( )

dump Queries

Deprecated:
Returns
mixed
Here is the call graph for this function:

◆ dumpTime()

dumpTime (   $name = 'XOOPS',
  $unset = false 
)

get the current execution time of a timer

Parameters
string$namename of the counter
bool$unsetremoves counter from global log
Returns
float current execution time of the counter
Here is the call graph for this function:

◆ enableRendering()

enableRendering ( )

Enable logger output rendering When output rendering is enabled, the logger will insert its output within the page content. If the string is found in the page content, the logger output will replace it, otherwise it will be inserted after all the page output.

◆ getInstance()

static getInstance ( )
static

Get a reference to the only instance of this class

Returns
object XoopsLogger reference to the only instance
Here is the caller graph for this function:

◆ handleError()

handleError (   $errno,
  $errstr,
  $errfile,
  $errline 
)

Error handling callback (called by the zend engine)

Parameters
integer$errno
string$errstr
string$errfile
string$errline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ handleException()

handleException (   $e)

Exception handling callback.

Parameters
\Exception | \Throwable$euncaught Exception or Error
Returns
void
Here is the call graph for this function:

◆ instance()

instance ( )

Deprecated, use getInstance() instead

Here is the call graph for this function:

◆ isThrowable()

isThrowable (   $e)
protected

Determine if an object implements Throwable (or is an Exception that would under PHP 7.)

Parameters
mixed$eExpected to be an object related to Exception or Throwable
Returns
bool true if related to Throwable or Exception, otherwise false
Here is the caller graph for this function:

◆ microtime()

microtime ( )

Returns the current microtime in seconds.

Returns
float
Here is the call graph for this function:
Here is the caller graph for this function:

◆ render()

render (   $output)

Output buffering callback inserting logger dump in page output

Parameters
$output
Returns
string
Here is the call graph for this function:

◆ sanitizePath()

sanitizePath (   $path)

@access protected

Parameters
string$path
Returns
mixed|string
Here is the caller graph for this function:

◆ startTime()

startTime (   $name = 'XOOPS')

Start a timer

Parameters
string$namename of the timer
Here is the call graph for this function:

◆ stopTime()

stopTime (   $name = 'XOOPS')

Stop a timer

Parameters
string$namename of the timer
Here is the call graph for this function:

◆ triggerError()

triggerError (   $errkey = 0,
  $errStr = '',
  $errFile = '',
  $errLine = '',
  $errNo = 0 
)

XoopsLogger::triggerError()

Deprecated:
Parameters
int$errkey
string$errStr
string$errFile
string$errLine
integer$errNo
Returns
void
Here is the call graph for this function:

Field Documentation

◆ $activated

◆ $blocks

$blocks = array()

◆ $deprecated

$deprecated = array()

◆ $errors

$errors = array()

◆ $extra

$extra = array()

◆ $logend

$logend = array()

◆ $logstart

$logstart = array()

◆ $queries

$queries = array()

◆ $renderingEnabled

$renderingEnabled = false

*@access protected

◆ $usePopup

$usePopup = false

*#-


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