class ClassInspector

Class inspector.

Methods

static array
getParents(object|string $class, bool $autoload = true)

Returns an array of all the parent classes of the class.

static array
getInterfaces(object|string $class, bool $autoload = true)

Returns an array of all the interfaces that the class implements.

static array
getTraits(object|string $class, bool $autoload = true)

Returns an array of all traits used by the class.

Details

at line 28
static array getParents(object|string $class, bool $autoload = true)

Returns an array of all the parent classes of the class.

Parameters

object|string $class Class name or class instance
bool $autoload Should the class be autoloaded?

Return Value

array

at line 40
static array getInterfaces(object|string $class, bool $autoload = true)

Returns an array of all the interfaces that the class implements.

Parameters

object|string $class Class name or class instance
bool $autoload Should the class be autoloaded?

Return Value

array

at line 52
static array getTraits(object|string $class, bool $autoload = true)

Returns an array of all traits used by the class.

Parameters

object|string $class Class name or class instance
bool $autoload Should the class be autoloaded?

Return Value

array