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 (~).
Attributes
- #[Stage]
- 'phpdoc.pipeline.api_documentation.compile'
- 15000
- 'Build "elements" index'
Table of Contents
Methods
- __invoke() : CompilableSubject
- Executes a compiler pass.
- getDescription() : string
- Returns a textual description of what this pass does for output purposes.
- 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
- Actual method executed by the compiler.
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()
Returns a textual description of what this pass does for output purposes.
public
getDescription() : string
Please note that the command line will be truncated to 68 characters (
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()
Actual method executed by the compiler.
protected
process(ApiSetDescriptor $subject) : ApiSetDescriptor
Processes the given ApiSetDescriptor and returns the modified ApiSetDescriptor.
Parameters
- $subject : ApiSetDescriptor