PHP Class Whoops\Util\TemplateHelper

Afficher le fichier Open project: filp/whoops Class Usage Examples

Méthodes publiques

Méthode Description
breakOnDelimiter ( string $delimiter, string $s ) : string Makes sure that the given string breaks on the delimiter.
delVariable ( string $variableName ) Unsets a single template variable, by its name
dump ( mixed $value ) : string Format the given value into a human readable string.
dumpArgs ( Whoops\Exception\Frame $frame ) : string Format the args of the given Frame as a human readable html string
escape ( string $raw ) : string Escapes a string for output in an HTML document
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.
getCloner ( ) : AbstractCloner Get the cloner used for dumping variables.
getVariable ( string $variableName, mixed $defaultValue = null ) : mixed Gets a single template variable, by its name, or $defaultValue if the variable does not exist
getVariables ( ) : array Returns all variables for this helper
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.
setCloner ( AbstractCloner $cloner ) Set the cloner used for dumping variables.
setVariable ( string $variableName, mixd $variableValue ) Sets a single template variable, by its name:
setVariables ( array $variables ) Sets the variables to be passed to all templates rendered by this template helper.
shorten ( string $path ) : string Replace the part of the path that all files have in common.
slug ( string $original ) : string Convert a string to a slug version of itself

Private Methods

Méthode Description
getDumper ( )

Method Details

breakOnDelimiter() public méthode

Makes sure that the given string breaks on the delimiter.
public breakOnDelimiter ( string $delimiter, string $s ) : string
$delimiter string
$s string
Résultat string

delVariable() public méthode

Unsets a single template variable, by its name
public delVariable ( string $variableName )
$variableName string

dump() public méthode

Format the given value into a human readable string.
public dump ( mixed $value ) : string
$value mixed
Résultat string

dumpArgs() public méthode

Format the args of the given Frame as a human readable html string
public dumpArgs ( Whoops\Exception\Frame $frame ) : string
$frame Whoops\Exception\Frame
Résultat string the rendered html

escape() public méthode

Escapes a string for output in an HTML document
public escape ( string $raw ) : string
$raw string
Résultat string

escapeButPreserveUris() public méthode

Escapes a string for output in an HTML document, but preserves URIs within it, and converts them to clickable anchor elements.
public escapeButPreserveUris ( string $raw ) : string
$raw string
Résultat string

getCloner() public méthode

Get the cloner used for dumping variables.
public getCloner ( ) : AbstractCloner
Résultat Symfony\Component\VarDumper\Cloner\AbstractCloner

getVariable() public méthode

Gets a single template variable, by its name, or $defaultValue if the variable does not exist
public getVariable ( string $variableName, mixed $defaultValue = null ) : mixed
$variableName string
$defaultValue mixed
Résultat mixed

getVariables() public méthode

Returns all variables for this helper
public getVariables ( ) : array
Résultat array

render() public méthode

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.
public render ( string $template, array $additionalVariables = null )
$template string
$additionalVariables array

setCloner() public méthode

Set the cloner used for dumping variables.
public setCloner ( AbstractCloner $cloner )
$cloner Symfony\Component\VarDumper\Cloner\AbstractCloner

setVariable() public méthode

Sets a single template variable, by its name:
public setVariable ( string $variableName, mixd $variableValue )
$variableName string
$variableValue mixd

setVariables() public méthode

Sets the variables to be passed to all templates rendered by this template helper.
public setVariables ( array $variables )
$variables array

shorten() public méthode

Replace the part of the path that all files have in common.
public shorten ( string $path ) : string
$path string
Résultat string

slug() public méthode

Convert a string to a slug version of itself
public slug ( string $original ) : string
$original string
Résultat string