php get class name of this
get_class($this);
php find all subclasses of class
/* Loops through all loaded classes (get_declared_classes()) and
returns an array of subclasses of the provided $parent */
function getSubclasses(string $parent):array {
return array_reduce(get_declared_classes(), function($subclasses, $class) use ($parent) {
if (is_subclass_of($class, $parent)) {
$subclasses[] = $class;
}
return $subclasses;
}, []);
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us