Browse code

Organize and show value types

Kevin Simper authored on 04/02/2015 14:44:30 • Fabien Potencier committed on 06/06/2015 23:19:31
Showing 1 changed files
... ...
@@ -72,29 +72,43 @@ options as the constructor second argument::
72 72
 
73 73
 The following options are available:
74 74
 
75
-* ``debug``: When set to ``true``, the generated templates have a
75
+* ``debug`` *boolean*
76
+
77
+  When set to ``true``, the generated templates have a
76 78
   ``__toString()`` method that you can use to display the generated nodes
77 79
   (default to ``false``).
78 80
 
79
-* ``charset``: The charset used by the templates (default to ``utf-8``).
81
+* ``charset`` *string (default to ``utf-8``)*
82
+
83
+  The charset used by the templates.
84
+
85
+* ``base_template_class`` *(default to ``Twig_Template``)*
86
+
87
+  The base template class to use for generated
88
+  templates.
80 89
 
81
-* ``base_template_class``: The base template class to use for generated
82
-  templates (default to ``Twig_Template``).
90
+* ``cache`` *boolean*
83 91
 
84
-* ``cache``: An absolute path where to store the compiled templates, or
92
+  An absolute path where to store the compiled templates, or
85 93
   ``false`` to disable caching (which is the default).
86 94
 
87
-* ``auto_reload``: When developing with Twig, it's useful to recompile the
95
+* ``auto_reload`` *boolean*
96
+
97
+  When developing with Twig, it's useful to recompile the
88 98
   template whenever the source code changes. If you don't provide a value for
89 99
   the ``auto_reload`` option, it will be determined automatically based on the
90 100
   ``debug`` value.
91 101
 
92
-* ``strict_variables``: If set to ``false``, Twig will silently ignore invalid
102
+* ``strict_variables`` *boolean*
103
+
104
+  If set to ``false``, Twig will silently ignore invalid
93 105
   variables (variables and or attributes/methods that do not exist) and
94 106
   replace them with a ``null`` value. When set to ``true``, Twig throws an
95 107
   exception instead (default to ``false``).
96 108
 
97
-* ``autoescape``: If set to ``true``, HTML auto-escaping will be enabled by
109
+* ``autoescape`` *boolean*
110
+
111
+  If set to ``true``, HTML auto-escaping will be enabled by
98 112
   default for all templates (default to ``true``).
99 113
 
100 114
   As of Twig 1.8, you can set the escaping strategy to use (``html``, ``js``,
... ...
@@ -110,7 +124,9 @@ The following options are available:
110 124
   strategy does not incur any overhead at runtime as auto-escaping is done at
111 125
   compilation time.)
112 126
 
113
-* ``optimizations``: A flag that indicates which optimizations to apply
127
+* ``optimizations`` *integer*
128
+
129
+  A flag that indicates which optimizations to apply
114 130
   (default to ``-1`` -- all optimizations are enabled; set it to ``0`` to
115 131
   disable).
116 132