\DeviceAtlas\DeviceComponentDetector

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.

Summary

Methods
Properties
Constants
__construct()
getComponents()
hasValidLookaroundConstraints()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
getComponentsByHeaders()
refineComponentsByLevel()
getComponentsByLevel()
$deviceData
$trieWalker
$maxComponentTypeSize
$dynamicPropertiesExtractor
$propertyMappingsRunner
$identifiersByComponentType
$componentTypes
N/A

Properties

$deviceData

$deviceData : 

Type

$trieWalker

$trieWalker : 

Type

$maxComponentTypeSize

$maxComponentTypeSize : 

Type

$dynamicPropertiesExtractor

$dynamicPropertiesExtractor : 

Type

$propertyMappingsRunner

$propertyMappingsRunner : 

Type

$identifiersByComponentType

$identifiersByComponentType : 

Type

$componentTypes

$componentTypes : 

Type

Methods

__construct()

__construct(  $deviceData,   $tokenTrieWalker,   $dynamicPropertiesExtractor,   $propertyMappingsRunner) 

Parameters

$deviceData
$tokenTrieWalker
$dynamicPropertiesExtractor
$propertyMappingsRunner
Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

getComponents()

getComponents(  $identifierOrHeaders,   $dynamicProperties) 

Get the properties detected from the passed identifier.

Parameters

$identifierOrHeaders
$dynamicProperties
Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

hasValidLookaroundConstraints()

hasValidLookaroundConstraints(  $referenceTokenPosition,   $lookaroundConstraints,   $allCandidates) : 

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

Parameters

$referenceTokenPosition
$lookaroundConstraints
$allCandidates
Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

getComponentsByHeaders()

getComponentsByHeaders(  $headers,   $dynamicProperties) 

Get properties from the passed collection of identifiers

Parameters

$headers
$dynamicProperties
Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

refineComponentsByLevel()

refineComponentsByLevel(  $result,   $dynamicProperties) 

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

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

Parameters

$result
$dynamicProperties
Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

getComponentsByLevel()

getComponentsByLevel(  $matchResult) 

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

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
Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275