public compileDo (array $statement) Compiles a “do” statement returning PHP code
public compileElseIf (array $statement) Compiles a “elseif” statement returning PHP code
public string compileEcho (array $statement) Compiles a ‘{{‘ ‘}}’ statement returning PHP code
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');
public string compileCall (array $statement, boolean $extendsMode) Compiles calls to macros
public compileCache (array $statement, [mixed $extendsMode]) Compiles a “cache” statement returning PHP code
public compileAutoEscape (array $statement, mixed $extendsMode) Compiles a “autoescape” statement returning PHP code
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
public addFunction (mixed $name, mixed $definition) Register a new function in the compiler
public attributeReader (array $expr) Resolves attribute reading
Page 57 of 382