class Debug (View source)

Properties

static protected array<string, string> $assistants
static protected array<string, string> $editors

Methods

setBeforeView(string $view)

Set view for display displayed before other defined from a Debug instance Note: This method does not affect behavior in the CLI environment

setDefinedView(string $view)

Set view for display defined constants, functions and classes Note: This method does not affect behavior in the CLI environment

setErrorView(string $view)

Set view for display errors and exceptions Note: This method does not affect behavior in the CLI environment

setPerformanceView(string $view)

Set view for display memory usage after application terminate Note: This method does not affect behavior in the CLI environment

unregister()

Unregister debug events and views

static array
performance()

Get memory usage and you can also use it to calculate runtime.

static array
classes()

Get declared classes

static array
functions()

Get declared functions

static array
constants()

Get defined constants

static array
source(string $file, int $line)

Get snippet from a file

static string
assistant(string $message, string $target = '_blank')

Convert error message into a link for a search engine or online assistant to analyze the error message. See system/configs/debug.php

static string
editor(string $file, int $line, string $target = '_self')

Creates a link to open a file in your editor via the protocol. See system/configs/debug.php

Details

setBeforeView(string $view)

Set view for display displayed before other defined from a Debug instance Note: This method does not affect behavior in the CLI environment

Parameters

string $view

setDefinedView(string $view)

Set view for display defined constants, functions and classes Note: This method does not affect behavior in the CLI environment

Parameters

string $view

Exceptions

Exception

setErrorView(string $view)

Set view for display errors and exceptions Note: This method does not affect behavior in the CLI environment

Parameters

string $view

Exceptions

Exception

setPerformanceView(string $view)

Set view for display memory usage after application terminate Note: This method does not affect behavior in the CLI environment

Parameters

string $view

Exceptions

Exception

unregister()

Unregister debug events and views

static array performance()

Get memory usage and you can also use it to calculate runtime.

Return Value

array

static array classes()

Get declared classes

Return Value

array

static array functions()

Get declared functions

Return Value

array

static array constants()

Get defined constants

Return Value

array

static array source(string $file, int $line)

Get snippet from a file

Parameters

string $file
int $line

Return Value

array

static string assistant(string $message, string $target = '_blank')

Convert error message into a link for a search engine or online assistant to analyze the error message. See system/configs/debug.php

Parameters

string $message
string $target

Return Value

string

static string editor(string $file, int $line, string $target = '_self')

Creates a link to open a file in your editor via the protocol. See system/configs/debug.php

Parameters

string $file
int $line
string $target

Return Value

string