IdentifierMatchResult
in package
Collects the MatchCandidates found during the token trie walk along with their token position. Positions for dynamic properties are also recorded for later use.
Tags
Table of Contents
- $componentsFound : mixed
- $dynamicPropertyPositions : mixed
- $identifier : mixed
- __construct() : mixed
- addDynamicPropertyPosition() : mixed
- The component and character position are stored in a map with the component as the key as it will later be accessed.
- getComponentsFound() : mixed
- getDynamicPropertyPositions() : mixed
- getIdentifier() : mixed
- hasDynamicPropertyPositions() : mixed
- put() : mixed
- Store a MatchCandidate along with it's token position. The token position is used by the lookaround constraints.
Properties
$componentsFound
private
mixed
$componentsFound
= []
$dynamicPropertyPositions
private
mixed
$dynamicPropertyPositions
$identifier
private
mixed
$identifier
Methods
__construct()
public
__construct(mixed $identifier) : mixed
Parameters
- $identifier : mixed
Return values
mixed —addDynamicPropertyPosition()
The component and character position are stored in a map with the component as the key as it will later be accessed.
public
addDynamicPropertyPosition( $component, $charPositionBeforeDynamicValue) : mixed
If the same token appears multiple times in an Identifier then only the last position will be stored with it. It may appear sensible to store all positions for a component to avoid losing the first position but it is more efficient to only store one position and to use rule constraints to prevent more than one of the same component being added.
Parameters
Return values
mixed —getComponentsFound()
public
getComponentsFound() : mixed
Return values
mixed —getDynamicPropertyPositions()
public
getDynamicPropertyPositions() : mixed
Return values
mixed —getIdentifier()
public
getIdentifier() : mixed
Return values
mixed —hasDynamicPropertyPositions()
public
hasDynamicPropertyPositions() : mixed
Return values
mixed —put()
Store a MatchCandidate along with it's token position. The token position is used by the lookaround constraints.
public
put( $position, $matchCandidate) : mixed