Html
in package
Una clase para renderizar plantillas HTML con Twig.
Tags
Table of Contents
- HTML_CHARS = ['<', '>', '"', "'"]
- HTML_REPLACEMENTS = ['<', '>', '"', ''']
- $functions : array<string|int, mixed>
- $loader : FilesystemLoader
- $paths : array<string|int, mixed>
- $plugins : bool
- $twig : Environment
- addFunction() : void
- addPath() : void
- disablePlugins() : void
- render() : string
- assetFunction() : TwigFunction
- attachedFileFunction() : TwigFunction
- bytesFunction() : TwigFunction
- cacheFunction() : TwigFunction
- configFunction() : TwigFunction
- executionTimeFunction() : TwigFunction
- fixHtmlFunction() : TwigFunction
- formTokenFunction() : TwigFunction
- getIncludeViews() : TwigFunction
- loadPluginFolders() : void
- moneyFunction() : TwigFunction
- myFilesUrlFunction() : TwigFunction
- numberFunction() : TwigFunction
- settingsFunction() : TwigFunction
- transFunction() : TwigFunction
- twig() : Environment
Constants
HTML_CHARS
public
mixed
HTML_CHARS
= ['<', '>', '"', "'"]
HTML_REPLACEMENTS
public
mixed
HTML_REPLACEMENTS
= ['<', '>', '"', ''']
Properties
$functions
private
static array<string|int, mixed>
$functions
= []
$loader
private
static FilesystemLoader
$loader
$paths
private
static array<string|int, mixed>
$paths
= []
$plugins
private
static bool
$plugins
= true
$twig
private
static Environment
$twig
Methods
addFunction()
public
static addFunction(TwigFunction $function) : void
Parameters
- $function : TwigFunction
Return values
void —addPath()
public
static addPath(string $name, string $path) : void
Parameters
- $name : string
- $path : string
Return values
void —disablePlugins()
public
static disablePlugins([bool $disable = true ]) : void
Parameters
- $disable : bool = true
Return values
void —render()
public
static render(string $template[, array<string|int, mixed> $params = [] ]) : string
Parameters
- $template : string
- $params : array<string|int, mixed> = []
Tags
Return values
string —assetFunction()
private
static assetFunction() : TwigFunction
Return values
TwigFunction —attachedFileFunction()
private
static attachedFileFunction() : TwigFunction
Return values
TwigFunction —bytesFunction()
private
static bytesFunction() : TwigFunction
Return values
TwigFunction —cacheFunction()
private
static cacheFunction() : TwigFunction
Return values
TwigFunction —configFunction()
private
static configFunction() : TwigFunction
Return values
TwigFunction —executionTimeFunction()
private
static executionTimeFunction() : TwigFunction
Return values
TwigFunction —fixHtmlFunction()
private
static fixHtmlFunction() : TwigFunction
Return values
TwigFunction —formTokenFunction()
private
static formTokenFunction() : TwigFunction
Return values
TwigFunction —getIncludeViews()
private
static getIncludeViews() : TwigFunction
Return values
TwigFunction —loadPluginFolders()
private
static loadPluginFolders() : void
Tags
Return values
void —moneyFunction()
private
static moneyFunction() : TwigFunction
Return values
TwigFunction —myFilesUrlFunction()
private
static myFilesUrlFunction() : TwigFunction
Return values
TwigFunction —numberFunction()
private
static numberFunction() : TwigFunction
Return values
TwigFunction —settingsFunction()
private
static settingsFunction() : TwigFunction
Return values
TwigFunction —transFunction()
private
static transFunction() : TwigFunction
Return values
TwigFunction —twig()
private
static twig() : Environment