ElementsIndexBuilder
extends ApiDocumentationPass
in package
This class constructs the index 'elements' and populates it with all Structural Elements.
Please note that due to a conflict between namespace FQSEN's and that of classes, interfaces, traits and functions will the namespace FQSEN be prefixed with a tilde (~).
Table of Contents
Constants
- COMPILER_PRIORITY = 15000
Methods
- __invoke() : CompilableSubject
- Executes a compiler pass.
- getDescription() : string
- addElementsToIndexes() : void
- Adds a series of descriptors to the given list of collections.
- getIndexKey() : string
- Retrieves a key for the index for the provided element.
- getSubElements() : array<string|int, ElementInterface>
- Returns any sub-elements for the given element.
- process() : ApiSetDescriptor
Constants
COMPILER_PRIORITY
public
final mixed
COMPILER_PRIORITY
= 15000
Methods
__invoke()
Executes a compiler pass.
public
final __invoke(CompilableSubject $subject) : CompilableSubject
This method will execute the business logic associated with a given compiler pass and allow it to manipulate or consumer the Object Graph using the ProjectDescriptor object.
Parameters
- $subject : CompilableSubject
-
Representation of the Object Graph that can be manipulated.
Return values
CompilableSubjectgetDescription()
public
getDescription() : string
Return values
stringaddElementsToIndexes()
Adds a series of descriptors to the given list of collections.
protected
addElementsToIndexes(ElementInterface|array<string|int, ElementInterface> $elements, array<int, Collection<string|int, ElementInterface>> $indexes) : void
Parameters
- $elements : ElementInterface|array<string|int, ElementInterface>
- $indexes : array<int, Collection<string|int, ElementInterface>>
getIndexKey()
Retrieves a key for the index for the provided element.
protected
getIndexKey(ElementInterface $element) : string
Parameters
- $element : ElementInterface
Return values
stringgetSubElements()
Returns any sub-elements for the given element.
protected
getSubElements(ElementInterface $element) : array<string|int, ElementInterface>
This method checks whether the given element is a class, interface or trait and returns their methods, properties and constants accordingly, or an empty array if no sub-elements are applicable.
Parameters
- $element : ElementInterface
Return values
array<string|int, ElementInterface>process()
protected
process(ApiSetDescriptor $subject) : ApiSetDescriptor
Parameters
- $subject : ApiSetDescriptor