\DeviceAtlas\DevicePropertiesCollector

Collects the properties from the components detected by the ComponentDetectorClass.

Summary

Methods
Properties
Constants
__construct()
collectProperties()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
findComponentForLevel()
refineChildSpecificComponent()
refineVersionSpecificComponent()
addProperties()
$initialPropertiesCapacity
$maxStockChildLevel
$dynamicPropertiesExtractor
$maxComponentTypeSize
$propertyNames
$propertyDataTypes
$componentTypes
N/A

Properties

$initialPropertiesCapacity

$initialPropertiesCapacity : 

Type

$maxStockChildLevel

$maxStockChildLevel : 

Type

$dynamicPropertiesExtractor

$dynamicPropertiesExtractor : 

Type

$maxComponentTypeSize

$maxComponentTypeSize : 

Type

$propertyNames

$propertyNames : 

Type

$propertyDataTypes

$propertyDataTypes : 

Type

$componentTypes

$componentTypes : 

Type

Methods

__construct()

__construct(  $deviceData,   $dynamicPropertiesExtractor) 

Parameters

$deviceData
$dynamicPropertiesExtractor
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

collectProperties()

collectProperties(  $result,   $dynamicProperties = array()) 

Collect all the properties including dynamic properties using the passed in array of components that were found from the identifiers.

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

findComponentForLevel()

findComponentForLevel(  $stockChild,   $currLevel) : \DeviceAtlas\Device\Component|null

If the current component is not set then try and find a replacement "stock" child component. A stock component is the default child component for a parent component. An example might be a device specific operating system under a device component.

In some situations, if the component from the previous level was not found or is a component not directly connected to the device then the passed stockChild might actually be from a higher level. If this is the case, it is necessary to check if the stock child itself has a stock child of the correct level.

Parameters

$stockChild
$currLevel
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

\DeviceAtlas\Device\Component|null —

A stock child component or null if none found

refineChildSpecificComponent()

refineChildSpecificComponent(  $prevLevelComponent,   $component) 

Try and refine a component to a more specific instance.

A more specific instance of a component is one that is a child of a previous component level. For example,

Previous level: Device (HTC One) | Specific child: Android ------ this may contain properties specific to the HTC One device

During the token trie walk a more generic form of Android might be found that does not have the device specific properties. It can be swapped out for the more specific Android instance by checking the previous component's children.

Parameters

$prevLevelComponent
$component
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

refineVersionSpecificComponent()

refineVersionSpecificComponent(  $component,   $dynamicProperties) 

Runs a version search if the component has version-specific children and the properties already collected contains the version property.

Parameters

$component
$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

addProperties()

addProperties(  $properties,   $component,   $addParentProperties) 

Parameters

$properties
$component
$addParentProperties
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