Properties

$variables

$variables : array

An array of variables to be passed to all templates

Type

array

$htmlDumper

$htmlDumper : \Symfony\Component\VarDumper\Dumper\HtmlDumper

Type

\Symfony\Component\VarDumper\Dumper\HtmlDumper

$cloner

$cloner : \Symfony\Component\VarDumper\Cloner\AbstractCloner

Type

\Symfony\Component\VarDumper\Cloner\AbstractCloner

$applicationRootPath

$applicationRootPath : string

Type

string

Methods

__construct()

__construct() 

escape()

escape(string  $raw) : string

Escapes a string for output in an HTML document

Parameters

string $raw

Returns

string

escapeButPreserveUris()

escapeButPreserveUris(string  $raw) : string

Escapes a string for output in an HTML document, but preserves URIs within it, and converts them to clickable anchor elements.

Parameters

string $raw

Returns

string

breakOnDelimiter()

breakOnDelimiter(string  $delimiter, string  $s) : string

Makes sure that the given string breaks on the delimiter.

Parameters

string $delimiter
string $s

Returns

string

shorten()

shorten(string  $path) : string

Replace the part of the path that all files have in common.

Parameters

string $path

Returns

string

dump()

dump(mixed  $value) : string

Format the given value into a human readable string.

Parameters

mixed $value

Returns

string

dumpArgs()

dumpArgs(\Whoops\Exception\Frame  $frame) : string

Format the args of the given Frame as a human readable html string

Parameters

\Whoops\Exception\Frame $frame

Returns

string —

the rendered html

slug()

slug(string  $original) : string

Convert a string to a slug version of itself

Parameters

string $original

Returns

string

render()

render(string  $template, array  $additionalVariables = null) 

Given a template path, render it within its own scope. This method also accepts an array of additional variables to be passed to the template.

Parameters

string $template
array $additionalVariables

setVariables()

setVariables(array  $variables) 

Sets the variables to be passed to all templates rendered by this template helper.

Parameters

array $variables

setVariable()

setVariable(string  $variableName, mixed  $variableValue) 

Sets a single template variable, by its name:

Parameters

string $variableName
mixed $variableValue

getVariable()

getVariable(string  $variableName, mixed  $defaultValue = null) : mixed

Gets a single template variable, by its name, or $defaultValue if the variable does not exist

Parameters

string $variableName
mixed $defaultValue

Returns

mixed

delVariable()

delVariable(string  $variableName) 

Unsets a single template variable, by its name

Parameters

string $variableName

getVariables()

getVariables() : array

Returns all variables for this helper

Returns

array

setCloner()

setCloner(\Symfony\Component\VarDumper\Cloner\AbstractCloner  $cloner) 

Set the cloner used for dumping variables.

Parameters

\Symfony\Component\VarDumper\Cloner\AbstractCloner $cloner

getCloner()

getCloner() : \Symfony\Component\VarDumper\Cloner\AbstractCloner

Get the cloner used for dumping variables.

Returns

\Symfony\Component\VarDumper\Cloner\AbstractCloner

setApplicationRootPath()

setApplicationRootPath(string  $applicationRootPath) 

Set the application root path.

Parameters

string $applicationRootPath

getApplicationRootPath()

getApplicationRootPath() : string

Return the application root path.

Returns

string

getDumper()

getDumper()