8000 [WIP] var-dumper component by nicolas-grekas · Pull Request #4243 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

[WIP] var-dumper component #4243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Nov 5, 2014
Merged
Prev Previous commit
Next Next commit
§ about Data::getLimitedClone()
  • Loading branch information
nicolas-grekas committed Oct 29, 2014
commit cb0ee899f51df62e72063e54f833ea33dcd5637b
17 changes: 17 additions & 0 deletions components/var_dumper/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,23 @@ Before cloning, you can configure the limits with::

They will be applied when calling ``->cloneVar()`` afterwards.

Before dumping it, you can further limit the resulting
:class:`Symfony\\Component\\VarDumper\\Cloner\\Data` object by calling its
:method:`Symfony\\Component\\VarDumper\\Cloner\\Data::getLimitedClone`
method:
- the first `$maxDepth` argument allows limiting dumps in the depth dimension,
- the second `$maxItemsPerDepth` limits the number of items per depth level,
- and the last `$useRefHandles` defaults to `true` but allows removing internal
objects' handles for sparser output,
- but unlike the previous limits on cloners that remove data on purpose, these
limits can be changed back and forth before dumping since they do not affect
the intermediate representation internally.

.. note::
When no limit is applied, a :class:`Symfony\\Component\\VarDumper\\Cloner\\Data`
object is as accurate as the native :phpfunction:`serialize` function and thus
could have a wider purpose than strictly dumping for debugging.

Dumpers
~~~~~~~

Expand Down
0