ElementsIndexBuilder
in package
implements
CompilerPassInterface
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 (~).
Interfaces, Classes and Traits
- CompilerPassInterface
- Represents a single pass / business rule to be executed by the Compiler.
Table of Contents
- COMPILER_PRIORITY = 15000
- execute() : void
- 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, DescriptorAbstract>
- Returns any sub-elements for the given element.
Constants
COMPILER_PRIORITY
public
mixed
COMPILER_PRIORITY
= 15000
Methods
execute()
Executes a compiler pass.
public
execute(ProjectDescriptor $project) : void
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
- $project : ProjectDescriptor
-
Representation of the Object Graph that can be manipulated.
Return values
void —getDescription()
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
string —addElementsToIndexes()
Adds a series of descriptors to the given list of collections.
protected
addElementsToIndexes(DescriptorAbstract|array<string|int, DescriptorAbstract> $elements, array<int, Collection<string|int, DescriptorAbstract>> $indexes) : void
Parameters
- $elements : DescriptorAbstract|array<string|int, DescriptorAbstract>
- $indexes : array<int, Collection<string|int, DescriptorAbstract>>
Return values
void —getIndexKey()
Retrieves a key for the index for the provided element.
protected
getIndexKey(DescriptorAbstract $element) : string
Parameters
- $element : DescriptorAbstract
Return values
string —getSubElements()
Returns any sub-elements for the given element.
protected
getSubElements(DescriptorAbstract $element) : array<string|int, DescriptorAbstract>
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 : DescriptorAbstract