php-utils

Debugger
in package

Debugger

Tags
version
1.0.0
since
1.0.0
license

MIT

A class to handle debugging

example

"$debug_messages = [];" Create an empty array to store debug messages

example

"$debugger = new Debugger;" Instantiate the debugger

example

"$debugger->debug_log($debug_messages, "This is a debug message", "Title");" Log a debug message

example

"$debugger->debug_log($debug_messages, "This is another debug message");" Log another debug message

example

"$debugger->debug_print($debug_messages, "Debug log");" Print the debug log

Table of Contents

Properties

$verbose  : bool
$vars  : mixed

Methods

__construct()  : void
__construct
debug_log()  : void
debug_log
debug_print()  : void
debug_print
format()  : void
format
output()  : void
output prints formatted output and echoes it
throw_exception()  : mixed

Properties

Methods

__construct()

__construct

public __construct([mixed $verbose = false ]) : void
Parameters
$verbose : mixed = false

debug_log()

debug_log

public debug_log(mixed &$debug_array, mixed $txt[, mixed $title = null ]) : void
Parameters
$debug_array : mixed
$txt : mixed
$title : mixed = null

debug_print()

debug_print

public debug_print(mixed &$debug_array[, mixed $tableName = "Debug" ]) : void
Parameters
$debug_array : mixed
$tableName : mixed = "Debug"

format()

format

public format(mixed $input[, mixed $type = 'info' ]) : void
Parameters
$input : mixed
$type : mixed = 'info'

output()

output prints formatted output and echoes it

public output(mixed $txt[, mixed $type = 'info' ][, mixed $die = false ]) : void
Parameters
$txt : mixed
$type : mixed = 'info'
$die : mixed = false

throw_exception()

public throw_exception(mixed $message) : mixed
Parameters
$message : mixed

        
On this page

Search results