Mvc\View\Engine\Volt\Compiler::compileDo

public compileDo (array $statement) Compiles a “do” statement returning PHP code

Mvc\View\Engine\Volt\Compiler::compileElseIf

public compileElseIf (array $statement) Compiles a “elseif” statement returning PHP code

Mvc\View\Engine\Volt\Compiler::compileEcho

public string compileEcho (array $statement) Compiles a ‘{{‘ ‘}}’ statement returning PHP code

Mvc\View\Engine\Volt\Compiler::compileFile

public string | array compileFile (string $path, string $compiledPath, [boolean $extendsMode]) Compiles a template into a file forcing the destination path $compiler->compile('views/layouts/main.volt', 'views/layouts/main.volt.php');

Mvc\View\Engine\Volt\Compiler::compileCall

public string compileCall (array $statement, boolean $extendsMode) Compiles calls to macros

Mvc\View\Engine\Volt\Compiler::compileCache

public compileCache (array $statement, [mixed $extendsMode]) Compiles a “cache” statement returning PHP code

Mvc\View\Engine\Volt\Compiler::compileAutoEscape

public compileAutoEscape (array $statement, mixed $extendsMode) Compiles a “autoescape” statement returning PHP code

Mvc\View\Engine\Volt\Compiler

implements Phalcon\Di\InjectionAwareInterface Source on GitHub This class reads and compiles Volt templates into PHP plain code $compiler = new \Phalcon\Mvc\View\Engine\Volt\Compiler(); $compiler->compile('views/partials/header.volt'); require $compiler->getCompiledTemplatePath(); Methods public __construct ([Phalcon\Mvc\ViewBaseInterface $view]) public setDI (Phalcon\DiInterface $dependencyInjector) Sets the dependency injector public getDI () Returns the internal dependency injector

Mvc\View\Engine\Volt\Compiler::addFunction

public addFunction (mixed $name, mixed $definition) Register a new function in the compiler

Mvc\View\Engine\Volt\Compiler::attributeReader

public attributeReader (array $expr) Resolves attribute reading