PHP Класс lithium\template\view\Compiler
It is possible to create your own template compiler and have the chosen
View adapter use that
instead. Please see the documentation on the dynamic dependencies of the adapter in question
to know more about how this can be achieved.
Показать файл
Открыть проект
Примеры использования класса
Защищенные свойства (Protected)
Свойство |
Тип |
Описание |
|
$_processors |
array |
Key/value pairs of regular expressions. The keys are the regexes, and the values are the
resulting expressions along with any capture groups that may have been used in the
corresponding regexes. |
|
Открытые методы
Метод |
Описание |
|
compile ( string $string ) : string |
Preprocess the passed $string (usually a PHP template) for syntax replacements
using sets of regular expressions. |
|
template ( string $file, array $options = [] ) : string |
Compiles a template and writes it to a cache file, which is used for inclusion. |
|
Описание методов
compile()
публичный статический Метод
Preprocess the passed $string (usually a PHP template) for syntax replacements
using sets of regular expressions.
template()
публичный статический Метод
Compiles a template and writes it to a cache file, which is used for inclusion.
public static template ( string $file, array $options = [] ) : string |
$file |
string |
The full path to the template that will be compiled. |
$options |
array |
Options for compilation include:
- `path`: Path where the compiled template should be written.
- `fallback`: Boolean indicating that if the compilation failed for some
reason (e.g. `path` is not writable), that the compiled template
should still be returned and no exception be thrown. |
Результат |
string |
The compiled template. |
Описание свойств
$_processors защищенное статическое свойство
Key/value pairs of regular expressions. The keys are the regexes, and the values are the
resulting expressions along with any capture groups that may have been used in the
corresponding regexes.
protected static array $_processors |
Результат |
array |
|