lithium\analysis\Inspector::parents()

public static method

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 = []) {
		$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);
	}