function ReflectionCaster::castGenerator
File
-
vendor/
symfony/ var-dumper/ Caster/ ReflectionCaster.php, line 81
Class
- ReflectionCaster
- Casts Reflector related classes to array representation.
Namespace
Symfony\Component\VarDumper\CasterCode
public static function castGenerator(\Generator $c, array $a, Stub $stub, bool $isNested) : array {
// Cannot create ReflectionGenerator based on a terminated Generator
try {
$reflectionGenerator = new \ReflectionGenerator($c);
return self::castReflectionGenerator($reflectionGenerator, $a, $stub, $isNested);
} catch (\Exception) {
$a[Caster::PREFIX_VIRTUAL . 'closed'] = true;
return $a;
}
}