mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-14 19:36:43 +00:00
Organize and show value types
This commit is contained in:
committed by
Fabien Potencier
parent
69984ee652
commit
0a46d06069
+25
-9
@@ -72,29 +72,43 @@ options as the constructor second argument::
|
||||
|
||||
The following options are available:
|
||||
|
||||
* ``debug``: When set to ``true``, the generated templates have a
|
||||
* ``debug`` *boolean*
|
||||
|
||||
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``).
|
||||
* ``charset`` *string (default to ``utf-8``)*
|
||||
|
||||
* ``base_template_class``: The base template class to use for generated
|
||||
templates (default to ``Twig_Template``).
|
||||
The charset used by the templates.
|
||||
|
||||
* ``cache``: An absolute path where to store the compiled templates, or
|
||||
* ``base_template_class`` *(default to ``Twig_Template``)*
|
||||
|
||||
The base template class to use for generated
|
||||
templates.
|
||||
|
||||
* ``cache`` *boolean*
|
||||
|
||||
An absolute path where to store the compiled templates, or
|
||||
``false`` to disable caching (which is the default).
|
||||
|
||||
* ``auto_reload``: When developing with Twig, it's useful to recompile the
|
||||
* ``auto_reload`` *boolean*
|
||||
|
||||
When developing with Twig, it's useful to recompile the
|
||||
template whenever the source code changes. If you don't provide a value for
|
||||
the ``auto_reload`` option, it will be determined automatically based on the
|
||||
``debug`` value.
|
||||
|
||||
* ``strict_variables``: If set to ``false``, Twig will silently ignore invalid
|
||||
* ``strict_variables`` *boolean*
|
||||
|
||||
If set to ``false``, Twig will silently ignore invalid
|
||||
variables (variables and or attributes/methods that do not exist) and
|
||||
replace them with a ``null`` value. When set to ``true``, Twig throws an
|
||||
exception instead (default to ``false``).
|
||||
|
||||
* ``autoescape``: If set to ``true``, HTML auto-escaping will be enabled by
|
||||
* ``autoescape`` *boolean*
|
||||
|
||||
If set to ``true``, HTML auto-escaping will be enabled by
|
||||
default for all templates (default to ``true``).
|
||||
|
||||
As of Twig 1.8, you can set the escaping strategy to use (``html``, ``js``,
|
||||
@@ -110,7 +124,9 @@ The following options are available:
|
||||
strategy does not incur any overhead at runtime as auto-escaping is done at
|
||||
compilation time.)
|
||||
|
||||
* ``optimizations``: A flag that indicates which optimizations to apply
|
||||
* ``optimizations`` *integer*
|
||||
|
||||
A flag that indicates which optimizations to apply
|
||||
(default to ``-1`` -- all optimizations are enabled; set it to ``0`` to
|
||||
disable).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user