function Data::dumpChildren
Dumps children of hash structures.
Return value
int The final number of removed items
1 call to Data::dumpChildren()
- Data::dumpItem in vendor/
symfony/ var-dumper/ Cloner/ Data.php - Depth-first dumping of items.
File
-
vendor/
symfony/ var-dumper/ Cloner/ Data.php, line 390
Class
- Data
- @author Nicolas Grekas <p@tchwork.com>
Namespace
Symfony\Component\VarDumper\ClonerCode
private function dumpChildren(DumperInterface $dumper, Cursor $parentCursor, array &$refs, array $children, int $hashCut, int $hashType, bool $dumpKeys) : int {
$cursor = clone $parentCursor;
++$cursor->depth;
$cursor->hashType = $hashType;
$cursor->hashIndex = 0;
$cursor->hashLength = \count($children);
$cursor->hashCut = $hashCut;
foreach ($children as $key => $child) {
$cursor->hashKeyIsBinary = isset($key[0]) && !preg_match('//u', $key);
$cursor->hashKey = $dumpKeys ? $key : null;
$this->dumpItem($dumper, $cursor, $refs, $child);
if (++$cursor->hashIndex === $this->maxItemsPerDepth || $cursor->stop) {
$parentCursor->stop = true;
return $hashCut >= 0 ? $hashCut + $cursor->hashLength - $cursor->hashIndex : $hashCut;
}
}
return $hashCut;
}