class Helpers

Rendering helpers for Debugger.

Methods

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

Returns HTML link to editor.

static string|null
editorUri(string $file, int|null $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|null $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 bool
isRedirect()

No description

static string
createId()

No description

static bool
isCli()

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|null $maxLength = null, bool $showWhitespaces = true)

No description

static int
utf8Length(string $s)

No description

static bool
isUtf8(string $s)

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

static array
getExceptionChain(Throwable $ex)

No description

static void
traverseValue($val, callable $callback, array $skip = [], string|null $refId = null)

No description

Details

Returns HTML link to editor.

Parameters

string $file
int|null $line

Return Value

string

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

Returns link to editor.

Parameters

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

Return Value

string|null

at line 79
static string formatHtml(string $mask)

No description

Parameters

string $mask

Return Value

string

at line 88
static string escapeHtml($s)

No description

Parameters

$s

Return Value

string

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

No description

Parameters

array $trace
$method
int|null $index

Return Value

array|null

at line 113
static string getClass($obj)

No description

Parameters

$obj

Return Value

string

at line 120
static Throwable fixStack(Throwable $exception)

internal  
 

No description

Parameters

Throwable $exception

Return Value

Throwable

at line 151
static string errorTypeToString(int $type)

internal  
 

No description

Parameters

int $type

Return Value

string

at line 175
static string getSource()

internal  
 

No description

Return Value

string

at line 193
static void improveException(Throwable $e)

internal  
 

No description

Parameters

Throwable $e

Return Value

void

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

internal  
 

No description

Parameters

string $message
array $context

Return Value

string

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

internal  
 

No description

Parameters

string $class

Return Value

string|null

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

internal  
 

Finds the best suggestion.

Parameters

array $items
string $value

Return Value

string|null

at line 314
static bool isHtmlMode()

internal  
 

No description

Return Value

bool

at line 325
static bool isAjax()

internal  
 

No description

Return Value

bool

at line 332
static bool isRedirect()

internal  
 

No description

Return Value

bool

at line 339
static string createId()

internal  
 

No description

Return Value

string

at line 346
static bool isCli()

internal  
 

No description

Return Value

bool

at line 353
static string|null getNonce()

internal  
 

No description

Return Value

string|null

at line 379
static string capture(callable $func)

Captures PHP output into a string.

Parameters

callable $func

Return Value

string

at line 393
static string encodeString(string $s, int|null $maxLength = null, bool $showWhitespaces = true)

internal  
 

No description

Parameters

string $s
int|null $maxLength
bool $showWhitespaces

Return Value

string

at line 457
static int utf8Length(string $s)

internal  
 

No description

Parameters

string $s

Return Value

int

at line 466
static bool isUtf8(string $s)

internal  
 

No description

Parameters

string $s

Return Value

bool

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

internal  
 

No description

Parameters

string $s
int $len
bool $utf

Return Value

string

at line 491
static string minifyJs(string $s)

internal  
 

No description

Parameters

string $s

Return Value

string

at line 537
static string minifyCss(string $s)

internal  
 

No description

Parameters

string $s

Return Value

string

at line 576
static bool detectColors()

No description

Return Value

bool

at line 588
static array getExceptionChain(Throwable $ex)

No description

Parameters

Throwable $ex

Return Value

array

at line 599
static void traverseValue($val, callable $callback, array $skip = [], string|null $refId = null)

No description

Parameters

$val
callable $callback
array $skip
string|null $refId

Return Value

void