Documentation

ComponentDetector
in package

Uses the TokenTrieWalker to try and find a set of Components for given input identifier(s).

The properties from the found components are merged and added to the main Properties collection for return to the user.

Tags
author

DeviceAtlas Limited

Table of Contents

Properties

$componentTypes  : mixed
$deviceData  : mixed
$dynamicPropertiesExtractor  : mixed
$identifiersByComponentType  : mixed
$maxComponentTypeSize  : mixed
$propertyMappingsRunner  : mixed
$trieWalker  : mixed

Methods

__construct()  : mixed
getComponents()  : mixed
Get the properties detected from the passed identifier.
hasValidLookaroundConstraints()  : mixed
Check the lookaround constraint for the match candidate to ensure that _other_ components are present within the allowed offset ranges.
getComponentsByHeaders()  : mixed
Get properties from the passed collection of identifiers
getComponentsByLevel()  : mixed
Given a collection of found components within an IdentifierMatchResult select the components that should be returned and used for properties.
refineComponentsByLevel()  : mixed
Refines the match candidates by running the property constraints and additional actions.

Properties

Methods

__construct()

public __construct(mixed $deviceData, mixed $tokenTrieWalker, mixed $dynamicPropertiesExtractor, mixed $propertyMappingsRunner) : mixed
Parameters
$deviceData : mixed
$tokenTrieWalker : mixed
$dynamicPropertiesExtractor : mixed
$propertyMappingsRunner : mixed

getComponents()

Get the properties detected from the passed identifier.

public getComponents(mixed $identifierOrHeaders, mixed &$dynamicProperties) : mixed
Parameters
$identifierOrHeaders : mixed
$dynamicProperties : mixed

hasValidLookaroundConstraints()

Check the lookaround constraint for the match candidate to ensure that _other_ components are present within the allowed offset ranges.

public static hasValidLookaroundConstraints( $referenceTokenPosition,  $lookaroundConstraints,  $allCandidates) : mixed
Parameters
$referenceTokenPosition :
$lookaroundConstraints :
$allCandidates :

getComponentsByHeaders()

Get properties from the passed collection of identifiers

private getComponentsByHeaders(mixed $headers, mixed &$dynamicProperties) : mixed
Parameters
$headers : mixed
$dynamicProperties : mixed

getComponentsByLevel()

Given a collection of found components within an IdentifierMatchResult select the components that should be returned and used for properties.

private getComponentsByLevel(mixed $matchResult) : mixed

One component per component level is returned. The component at each level must • Pass the the lookaround constraint if it exists • Be of greater weight than any other component of the same level or be of the same weight but found deeper in the identifier.

Parameters
$matchResult : mixed

refineComponentsByLevel()

Refines the match candidates by running the property constraints and additional actions.

private refineComponentsByLevel(mixed $result, mixed &$dynamicProperties) : mixed

Java impl.: getComponentsByLevel(final ComponentDetectorResult result, final Map<String, Property> dynamicProperties)

Parameters
$result : mixed
$dynamicProperties : mixed

        
On this page

Search results