Helpers
class Helpers
Rendering helpers for Debugger.
Methods
Returns HTML link to editor.
Returns link to editor.
Formats an HTML string by replacing each % placeholder with the next argument, HTML-escaped.
No description
No description
No description
No description
No description
No description
No description
Finds the best suggestion.
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Decomposes an integer flags value into matching constant names.
Encodes a value to JSON safe for use in any HTML context (attributes, script tags, etc.)
Details
at line 22
static string
editorLink(string $file, int|null $line = null)
Returns HTML link to editor.
at line 52
static string|null
editorUri(string $file, int|null $line = null, string $action = 'open', string $search = '', string $replace = '')
Returns link to editor.
at line 81
static string
formatHtml(string $mask)
Formats an HTML string by replacing each % placeholder with the next argument, HTML-escaped.
at line 90
static string
escapeHtml(mixed $s)
No description
at line 96
static string
htmlToText(string $s)
No description
at line 107
static array|null
findTrace(array $trace, array|string $method, int|null $index = null)
No description
at line 127
static string
errorTypeToString(int $type)
| internal |
No description
at line 150
static string
getSource()
| internal |
No description
at line 168
static void
improveException(Throwable $e)
| internal |
No description
at line 244
static string
improveError(string $message)
| internal |
No description
at line 258
static string|null
guessClassFile(string $class)
| internal |
No description
at line 287
static string|null
getSuggestion(array $items, string $value)
| internal |
Finds the best suggestion.
at line 304
static bool
isHtmlMode()
| internal |
No description
at line 315
static bool
isRedirect()
| internal |
No description
at line 322
static string
createId()
| internal |
No description
at line 329
static bool
isCli()
| internal |
No description
at line 336
static string|null
getNonce(bool $attr = false)
| internal |
No description
at line 363
static string
capture(callable $func)
No description
at line 377
static string
encodeString(string $s, int|null $maxLength = null, bool $showWhitespaces = true)
| internal |
No description
at line 439
static int
utf8Length(string $s)
| internal |
No description
at line 450
static bool
isUtf8(string $s)
| internal |
No description
at line 457
static string
truncateString(string $s, int $len, bool $utf8)
| internal |
No description
at line 478
static string
htmlToAnsi(string $s, array $colors)
| internal |
No description
at line 500
static string
minifyJs(string $s)
| internal |
No description
at line 545
static string
minifyCss(string $s)
| internal |
No description
at line 583
static bool
detectColors()
No description
at line 596
static array
getExceptionChain(Throwable $ex)
No description
at line 611
static void
traverseValue(mixed $val, callable $callback, array $skip = [], string|null $refId = null)
No description
at line 645
static array|null
decomposeFlags(int $flags, bool $set, array $constants)
| internal |
Decomposes an integer flags value into matching constant names.
When $set is true, finds all flags set in the value (bitmask decomposition). When $set is false, finds a single constant that equals the value exactly.
at line 672
static string
jsonEncode(mixed $value, bool $inScript = false)
Encodes a value to JSON safe for use in any HTML context (attributes, script tags, etc.)