wireClassParents() function

Return array of all parent classes for given class/object

ProcessWire namespace aware version of PHP’s class_parents() function

Returns associative array where array keys are full namespaced class name, and values are the non-namespaced classname.

Usage

// basic usage
$array = wireClassParents($className);

// usage with all arguments
$array = wireClassParents($className, bool $autoload = true);

Arguments

NameType(s)Description
classNamestring, object
autoload (optional)bool

Return value

array


Functions methods and properties

API reference based on ProcessWire core version 3.0.244

I just love the easy and intuitive ProcessWire API. ProcessWire rocks!” —Jens Martsch, Web developer