function LazyObjectRegistry::getParentMethods
File
-
vendor/
symfony/ var-exporter/ Internal/ LazyObjectRegistry.php, line 103
Class
- LazyObjectRegistry
- Stores the state of lazy objects and caches related reflection information.
Namespace
Symfony\Component\VarExporter\InternalCode
public static function getParentMethods($class) {
$parent = get_parent_class($class);
$methods = [];
foreach ([
'set',
'isset',
'unset',
'clone',
'serialize',
'unserialize',
'sleep',
'wakeup',
'destruct',
'get',
] as $method) {
if (!$parent || !method_exists($parent, '__' . $method)) {
$methods[$method] = false;
}
else {
$m = new \ReflectionMethod($parent, '__' . $method);
$methods[$method] = !$m->isAbstract() && !$m->isPrivate();
}
}
$methods['get'] = $methods['get'] ? $m->returnsReference() ? 2 : 1 : 0;
return $methods;
}