function SplCaster::castObjectStorage
File
-
vendor/
symfony/ var-dumper/ Caster/ SplCaster.php, line 179
Class
- SplCaster
- Casts SPL related classes to array representation.
Namespace
Symfony\Component\VarDumper\CasterCode
public static function castObjectStorage(\SplObjectStorage $c, array $a, Stub $stub, bool $isNested) : array {
$storage = [];
unset($a[Caster::PREFIX_DYNAMIC . "\x00gcdata"]);
// Don't hit https://bugs.php.net/65967
unset($a["\x00SplObjectStorage\x00storage"]);
$clone = clone $c;
foreach ($clone as $obj) {
$storage[] = new EnumStub([
'object' => $obj,
'info' => $clone->getInfo(),
]);
}
$a += [
Caster::PREFIX_VIRTUAL . 'storage' => $storage,
];
return $a;
}