ClassAncestorNamesExtractor
class ClassAncestorNamesExtractor (View source)
Extracts the list of ancestor class FQNs from a PHPClass by traversing the parentClass chain.
When ClassHierarchyResolver has linked parentClass objects to their actual instances, getId() carries the fully-qualified name (e.g. "\Random\RandomError"). The leading backslash is stripped so the result matches the format PHP reflection returns (e.g. "Random\RandomError"). For unresolved stubs (getId() is null) the stored getName() value is used as a fallback.
Methods
Details
array
extract(PHPClass $class)
Returns FQNs (no leading ) of all ancestor classes, nearest-first.
Cycle-safe via a visited-set.