Available options:
* debug: When set to true, the generated templates have a __toString()
method that you can use to display the generated nodes (default to
false).
* charset: The charset used by the templates (default to utf-8).
* base_template_class: The base template class to use for generated
templates (default to Twig_Template).
* cache: An absolute path where to store the compiled templates, or
false to disable compilation cache (default)
* auto_reload: Whether to reload the template is the original source changed.
If you don't provide the auto_reload option, it will be
determined automatically base on the debug value.
* strict_variables: Whether to ignore invalid variables in templates
(default to false).
* autoescape: Whether to enable auto-escaping (default to true);
* optimizations: A flag that indicates which optimizations to apply
(default to -1 which means that all optimizations are enabled;
set it to 0 to disable)
public __construct ( Twig_LoaderInterface $loader = null, array $options = [] ) | ||
$loader | Twig_LoaderInterface | A Twig_LoaderInterface instance |
$options | array | An array of options |