// Add interface restriction in Autoload
This commit is contained in:
1 parent
dde8540a86
commit
9b241d5e1d
1 file changed
+2
@@ -99,6 +99,8 @@ class Autoload
|
|||||||
|
|
||||||
// Since the classname does not exists (we only have a classCore class), we have to emulate the declaration of this class
|
// Since the classname does not exists (we only have a classCore class), we have to emulate the declaration of this class
|
||||||
$class_infos = new ReflectionClass($classname.'Core');
|
$class_infos = new ReflectionClass($classname.'Core');
|
||||||
|
|
||||||
|
if (!$class_infos->isInterface())
|
||||||
eval(($class_infos->isAbstract() ? 'abstract ' : '').'class '.$classname.' extends '.$classname.'Core {}');
|
eval(($class_infos->isAbstract() ? 'abstract ' : '').'class '.$classname.' extends '.$classname.'Core {}');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in new issue
Block a user