Extends
lithium\core\StaticObject
Gets the full inheritance list for the given class.
Parameters
- string $class Class whose inheritance chain will be returned
- array $options Option consists of: - `'autoLoad'` _boolean_: Whether or not to call `__autoload` by default. Defaults to `true`.
Returns
array An array of the name of the parent classes of the passed `$class` parameter, or `false` on error.Source
public static function parents($class, array $options = array()) {
$defaults = array('autoLoad' => false);
$options += $defaults;
$class = is_object($class) ? get_class($class) : $class;
if (!class_exists($class, $options['autoLoad'])) {
return false;
}
return class_parents($class);
}