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
Properties
- $dynamicPropertyPositions : mixed
- $identifier : mixed
- $tokenPositionToMatchCandidates : mixed
Methods
- __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.
- addMatchCandidates() : mixed
- Store match candidates along with it's token position. The token position is used by the lookaround constraints.
- getDynamicPropertyPositions() : mixed
- getIdentifier() : mixed
- getMatchCandidates() : mixed
- hasDynamicPropertyPositions() : mixed
Properties
$dynamicPropertyPositions
private
mixed
$dynamicPropertyPositions
$identifier
private
mixed
$identifier
$tokenPositionToMatchCandidates
private
mixed
$tokenPositionToMatchCandidates
= []
Methods
__construct()
public
__construct(mixed $identifier) : mixed
Parameters
- $identifier : 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 BasicInput 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
addMatchCandidates()
Store match candidates along with it's token position. The token position is used by the lookaround constraints.
public
addMatchCandidates( $tokenPosition, $matchCandidates) : mixed
Parameters
getDynamicPropertyPositions()
public
getDynamicPropertyPositions() : mixed
getIdentifier()
public
getIdentifier() : mixed
getMatchCandidates()
public
getMatchCandidates() : mixed
hasDynamicPropertyPositions()
public
hasDynamicPropertyPositions() : mixed