lithium\analysis\Inspector::parents()
Gets the full inheritance list for the given class.
Parameters
-
string
$classClass whose inheritance chain will be returned
-
array
$optionsOption consists of:
'autoLoad'boolean: Whether or not to call__autoloadby default. Defaults totrue.
Returns
arrayAn array of the name of the parent classes of the passed $class parameter,
or false on error.
Links
Source
public static function parents($class, array $options = []) {
$defaults = ['autoLoad' => false];
$options += $defaults;
$class = is_object($class) ? get_class($class) : $class;
if (!class_exists($class, $options['autoLoad'])) {
return false;
}
return class_parents($class);
}