class Helpers

Rendering helpers for Debugger.

Methods

static string
editorLink(string $file, int $line = null)

Returns HTML link to editor.

static string|null
editorUri(string $file, int $line = null, string $action = 'open', string $search = '', string $replace = '')

Returns link to editor.

static string
formatHtml(string $mask)

No description

static string
escapeHtml($s)

No description

static array|null
findTrace(array $trace, $method, int $index = null)

No description

static string
getClass($obj)

No description

static Throwable
fixStack(Throwable $exception)

No description

static string
errorTypeToString(int $type)

No description

static string
getSource()

No description

static void
improveException(Throwable $e)

No description

static string
improveError(string $message, array $context = [])

No description

static string|null
guessClassFile(string $class)

No description

static string|null
getSuggestion(array $items, string $value)

Finds the best suggestion.

static bool
isHtmlMode()

No description

static bool
isAjax()

No description

static string|null
getNonce()

No description

static string
capture(callable $func)

Captures PHP output into a string.

static string
encodeString(string $s, int $maxLength = null, $utf = null)

No description

static string
truncateString(string $s, int $len, bool $utf)

No description

static string
minifyJs(string $s)

No description

static string
minifyCss(string $s)

No description

static bool
detectColors()

No description

Details

Returns HTML link to editor.

Parameters

string $file
int $line

Return Value

string

at line 46
static string|null editorUri(string $file, int $line = null, string $action = 'open', string $search = '', string $replace = '')

Returns link to editor.

Parameters

string $file
int $line
string $action
string $search
string $replace

Return Value

string|null

at line 63
static string formatHtml(string $mask)

Parameters

string $mask

Return Value

string

at line 72
static string escapeHtml($s)

Parameters

$s

Return Value

string

at line 78
static array|null findTrace(array $trace, $method, int $index = null)

Parameters

array $trace
$method
int $index

Return Value

array|null

at line 96
static string getClass($obj)

Parameters

$obj

Return Value

string

at line 103
static Throwable fixStack(Throwable $exception)

Parameters

Throwable $exception

Return Value

Throwable

at line 129
static string errorTypeToString(int $type)

Parameters

int $type

Return Value

string

at line 153
static string getSource()

Return Value

string

at line 167
static void improveException(Throwable $e)

Parameters

Throwable $e

Return Value

void

at line 216
static string improveError(string $message, array $context = [])

Parameters

string $message
array $context

Return Value

string

at line 233
static string|null guessClassFile(string $class)

Parameters

string $class

Return Value

string|null

at line 259
static string|null getSuggestion(array $items, string $value)

Finds the best suggestion.

Parameters

array $items
string $value

Return Value

string|null

at line 275
static bool isHtmlMode()

Return Value

bool

at line 284
static bool isAjax()

Return Value

bool

at line 291
static string|null getNonce()

Return Value

string|null

at line 317
static string capture(callable $func)

Captures PHP output into a string.

Parameters

callable $func

Return Value

string

at line 331
static string encodeString(string $s, int $maxLength = null, $utf = null)

Parameters

string $s
int $maxLength
$utf

Return Value

string

at line 368
static string truncateString(string $s, int $len, bool $utf)

Parameters

string $s
int $len
bool $utf

Return Value

string

at line 382
static string minifyJs(string $s)

Parameters

string $s

Return Value

string

at line 423
static string minifyCss(string $s)

Parameters

string $s

Return Value

string

at line 457
static bool detectColors()

Return Value

bool