PHP Class Essence\Utility\Template

Afficher le fichier Open project: benjamminf/craft-embedded-assets Class Usage Examples

Méthodes publiques

Méthode Description
compile ( string $template, array $variables, callable $filter = null ) : string Compiles a template with variables.

Méthodes protégées

Méthode Description
_compileFunction ( array $variables, callable | null $filter ) : Closure Returns a function used to replace variables by values.

Method Details

_compileFunction() protected static méthode

Returns a function used to replace variables by values.
See also: compile()
protected static _compileFunction ( array $variables, callable | null $filter ) : Closure
$variables array Variables.
$filter callable | null Filter function.
Résultat Closure Function.

compile() public static méthode

Compiles a template with variables.
public static compile ( string $template, array $variables, callable $filter = null ) : string
$template string Template.
$variables array Variables.
$filter callable Filter function.
Résultat string Compiled template.