TimeTrex API Manual

Debug
in package

Table of Contents

$buffer_id  : mixed
$buffer_output  : mixed
$buffer_size  : mixed
$current_pid  : mixed
$debug_buffer  : mixed
$email_log  : mixed
$enable  : mixed
$enable_display  : mixed
$enable_log  : mixed
$max_buffer_size  : mixed
$max_line_size  : mixed
$php_errors  : mixed
$verbosity  : mixed
Arr()  : bool
backTrace()  : string
clearBuffer()  : bool
Display()  : bool
emailLog()  : bool
ErrorHandler()  : bool
getCurrentPID()  : false|int|null
Get PID of current process.
getEnable()  : bool
getEnableDisplay()  : bool
getEnableLog()  : bool
getExecutionTime()  : float
Used to add timing to each debug call.
getLastPHPErrorMessage()  : string|false
getOutput()  : bool|null|string
getPHPErrors()  : int
getSyslogFacility()  : int|mixed
Three primary log types: $log_types = array( 0 => 'debug', 1 => 'client', 2 => 'timeclock' );
getSyslogIdent()  : mixed
getSyslogPriority()  : int|mixed
getVerbosity()  : int
handleBufferSize()  : bool
profileTimers()  : bool|string
Query()  : bool
Output SQL query with place holders inserted into the query.
RequestHeaders()  : array<string|int, mixed>
setBufferID()  : mixed
setBufferOutput()  : mixed
setEnable()  : mixed
setEnableDisplay()  : mixed
setEnableLog()  : mixed
setVerbosity()  : mixed
showSQLProfile()  : mixed
Shutdown()  : bool
splitInput()  : array<string|int, mixed>
Splits long debug lines or array dumps to prevent syslog overflows.
Text()  : bool
varDump()  : string
writeToLog()  : bool

Properties

$buffer_id

protected static mixed $buffer_id = \null

$buffer_output

protected static mixed $buffer_output = \true

$buffer_size

protected static mixed $buffer_size = 0

$current_pid

protected static mixed $current_pid = \null

$debug_buffer

protected static mixed $debug_buffer = \null

$email_log

protected static mixed $email_log = \false

$enable_display

protected static mixed $enable_display = \false

$enable_log

protected static mixed $enable_log = \false

$max_buffer_size

protected static mixed $max_buffer_size = 1000

$max_line_size

protected static mixed $max_line_size = 200

Methods

Arr()

public static Arr( $array[, null $text = null ][, string $file = __FILE__ ][, int $line = __LINE__ ][, string $method = __METHOD__ ][, int $verbosity = 9 ]) : bool
Parameters
$array :
$text : null = null
$file : string = __FILE__
$line : int = __LINE__
$method : string = __METHOD__
$verbosity : int = 9
Return values
bool

backTrace()

public static backTrace() : string
Return values
string

clearBuffer()

public static clearBuffer() : bool
Return values
bool

Display()

public static Display() : bool
Return values
bool

emailLog()

public static emailLog() : bool
Return values
bool

ErrorHandler()

public static ErrorHandler( $error_number,  $error_str,  $error_file,  $error_line) : bool
Parameters
$error_number :
$error_str :
$error_file :
$error_line :
Return values
bool

getCurrentPID()

Get PID of current process.

public static getCurrentPID() : false|int|null
Return values
false|int|null

getEnable()

public static getEnable() : bool
Return values
bool

getEnableDisplay()

public static getEnableDisplay() : bool
Return values
bool

getEnableLog()

public static getEnableLog() : bool
Return values
bool

getExecutionTime()

Used to add timing to each debug call.

public static getExecutionTime() : float
Return values
float

getLastPHPErrorMessage()

public static getLastPHPErrorMessage() : string|false
Return values
string|false

getOutput()

public static getOutput() : bool|null|string
Return values
bool|null|string

getPHPErrors()

public static getPHPErrors() : int
Return values
int

getSyslogFacility()

Three primary log types: $log_types = array( 0 => 'debug', 1 => 'client', 2 => 'timeclock' );

public static getSyslogFacility(int $log_type) : int|mixed
Parameters
$log_type : int
Return values
int|mixed

getSyslogIdent()

public static getSyslogIdent([string $extra_ident = null ][, null $company_name = null ]) : mixed
Parameters
$extra_ident : string = null

UUID

$company_name : null = null
Return values
mixed

getSyslogPriority()

public static getSyslogPriority(int $log_type) : int|mixed
Parameters
$log_type : int
Return values
int|mixed

getVerbosity()

public static getVerbosity() : int
Return values
int

handleBufferSize()

public static handleBufferSize([null $line = null ][, null $method = null ][, mixed $force = false ]) : bool
Parameters
$line : null = null
$method : null = null
$force : mixed = false
Return values
bool

profileTimers()

public static profileTimers(object $profile_obj) : bool|string
Parameters
$profile_obj : object
Return values
bool|string

Query()

Output SQL query with place holders inserted into the query.

public static Query( $query,  $ph[, string $file = __FILE__ ][, int $line = __LINE__ ][, string $method = __METHOD__ ][, int $verbosity = 9 ]) : bool
Parameters
$query :
$ph :
$file : string = __FILE__
$line : int = __LINE__
$method : string = __METHOD__
$verbosity : int = 9
Return values
bool

RequestHeaders()

public static RequestHeaders() : array<string|int, mixed>
Return values
array<string|int, mixed>

Replacement for apache_request_headers() as it wasn't reliably available and would sometimes cause PHP fatal errors due to it being undefined.

Replacement for apache_request_headers() as it wasn't reliably available and would sometimes cause PHP fatal errors due to it being undefined.

setBufferID()

public static setBufferID() : mixed
Return values
mixed

setBufferOutput()

public static setBufferOutput( $bool) : mixed
Parameters
$bool :
Return values
mixed

setEnable()

public static setEnable( $bool) : mixed
Parameters
$bool :
Return values
mixed

setEnableDisplay()

public static setEnableDisplay( $bool) : mixed
Parameters
$bool :
Return values
mixed

setEnableLog()

public static setEnableLog( $bool) : mixed
Parameters
$bool :
Return values
mixed

setVerbosity()

public static setVerbosity( $level) : mixed
Parameters
$level :
Return values
mixed

showSQLProfile()

public static showSQLProfile() : mixed
Return values
mixed

Shutdown()

public static Shutdown() : bool
Return values
bool

splitInput()

Splits long debug lines or array dumps to prevent syslog overflows.

public static splitInput( $text[, null $prefix = null ][, null $suffix = null ]) : array<string|int, mixed>
Parameters
$text :
$prefix : null = null
$suffix : null = null
Return values
array<string|int, mixed>

Text()

public static Text([null $text = null ][, string $file = __FILE__ ][, int $line = __LINE__ ][, string $method = __METHOD__ ][, int $verbosity = 9 ]) : bool
Parameters
$text : null = null
$file : string = __FILE__
$line : int = __LINE__
$method : string = __METHOD__
$verbosity : int = 9
Return values
bool

varDump()

public static varDump( $array) : string
Parameters
$array :
Return values
string

writeToLog()

public static writeToLog() : bool
Return values
bool

Search results