class ClassHierarchyResolver (View source)

Resolves parent class and interface references after all entities are loaded.

During deserialization, parent class and interface objects are created as stubs containing only the short class name. This resolver replaces those stubs with the actual objects from the loaded collection, enabling full hierarchy traversal via PHPClass::getAncestorClassNames() and PHPClass::getImplementedInterfaceNames().

Methods

void
resolve(iterable $classes, iterable $interfaces = [], iterable $enums = [])

Link parentClass and interfaces on every PHPClass to the actual objects in the collection.

Details

void resolve(iterable $classes, iterable $interfaces = [], iterable $enums = [])

Link parentClass and interfaces on every PHPClass to the actual objects in the collection.

Also links interfaces on every PHPEnum.

Parameters

iterable $classes

All PHPClass instances from the storage

iterable $interfaces

All PHPInterface instances from the storage

iterable $enums

All PHPEnum instances from the storage

Return Value

void