class Helpers

internal  
 

Latte helpers.

Methods

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

Finds the best suggestion.

toReflection($callable)

intentionally without callable typehint, because it generates bad error messages

static array
sortBeforeAfter(array $list)

No description

static void
removeNulls(array $items)

No description

static array|null
mapCompiledToSource(string $compiledFile, int|null $compiledLine = null)

Attempts to map the compiled template to the source.

static string|null
guessTemplatePosition()

Tries to guess the position in the template from the backtrace

Details

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

Finds the best suggestion.

Parameters

array $items
string $value

Return Value

string|null

at line 42
static ReflectionFunctionAbstract toReflection($callable)

intentionally without callable typehint, because it generates bad error messages

Parameters

$callable

Return Value

ReflectionFunctionAbstract

at line 58
static array sortBeforeAfter(array $list)

No description

Parameters

array $list

Return Value

array

at line 96
static void removeNulls(array $items)

No description

Parameters

array $items

Return Value

void

at line 105
static array|null mapCompiledToSource(string $compiledFile, int|null $compiledLine = null)

Attempts to map the compiled template to the source.

Parameters

string $compiledFile
int|null $compiledLine

Return Value

array|null

at line 123
static string|null guessTemplatePosition()

Tries to guess the position in the template from the backtrace

Return Value

string|null