public addFilter (mixed $name, mixed $definition) Register a new filter in the compiler
public addExtension (mixed $extension) Registers a Volt’s extension
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 sort (array $value) Sorts an array
public slice (mixed $value, [mixed $start], [mixed $end]) Extracts a slice from a string/array/traversable object value
public setOptions (array $options) Set Volt’s options
public render (mixed $templatePath, mixed $params, [mixed $mustClean]) Renders a view using the template engine
public length (mixed $item) Length filter. If an array/object is passed a count is performed otherwise a strlen/mb_strlen
public isIncluded (mixed $needle, mixed $haystack) Checks if the needle is included in the haystack
public getOptions () Return Volt’s options
Page 58 of 382