@@ -97,7 +97,12 @@ Dumpers
97
97
98
98
A dumper is responsible for outputting a string representation of a PHP variable,
99
99
using a :class: `Symfony\\ Component\\ VarDumper\\ Cloner\\ Data ` object as input.
100
- The destination and the formatting of this output vary with dumpers.
100
+ The destination and the formatting of this output vary with dumpers and are
101
+ influenced by two environment variables:
102
+ If ``DUMP_STRING_LENGTH `` is set, then
103
+ the length of a string is displayed next to its content.
104
+ If ``DUMP_LIGHT_ARRAY `` is set,
105
+ then arrays are not displayed completely.
101
106
102
107
This component comes with an :class: `Symfony\\ Component\\ VarDumper\\ Dumper\\ HtmlDumper `
103
108
for HTML output and a :class: `Symfony\\ Component\\ VarDumper\\ Dumper\\ CliDumper `
@@ -181,6 +186,21 @@ method. They also typically implement the
181
186
them from re-implementing the logic required to walk through a
182
187
:class: `Symfony\\ Component\\ VarDumper\\ Cloner\\ Data ` object's internal structure.
183
188
189
+ The HTMLDumper limits string length and nesting depth of the output.
190
+ These options can be overriden by providing a third parameter when calling ``dump ``::
191
+
192
+ use Symfony\Component\VarDumper\Dumper\HtmlDumper;
193
+
194
+ $output = fopen('php://memory', 'r+b');
195
+
196
+ $dumper = new HtmlDumper();
197
+ $dumper->dump($var, $output, array(
198
+ 'maxDepth' => 1,
199
+ 'maxStringLength' => 160
200
+ ));
201
+
202
+ // Limit nesting to 1 level and string length to 160 characters (default)
203
+
184
204
Casters
185
205
-------
186
206
0 commit comments