return $a;
} private static function castSplArray(\ArrayObject|\ArrayIterator
$c, array
$a, Stub
$stub, bool
$isNested): array
{ $prefix = Caster::PREFIX_VIRTUAL;
$flags =
$c->
getFlags();
if (!
($flags & \ArrayObject::STD_PROP_LIST
)) { $c->
setFlags(\ArrayObject::STD_PROP_LIST
);
$a = Caster::
castObject($c,
$c::
class,
method_exists($c, '__debugInfo'
),
$stub->class
);
$c->
setFlags($flags);
} unset($a["\0ArrayObject\0storage"
],
$a["\0ArrayIterator\0storage"
]);
$a +=
[ $prefix.'storage' =>
$c->
getArrayCopy(),
$prefix.'flag::STD_PROP_LIST' =>
(bool) ($flags & \ArrayObject::STD_PROP_LIST
),
$prefix.'flag::ARRAY_AS_PROPS' =>
(bool) ($flags & \ArrayObject::ARRAY_AS_PROPS
),
];