$initialPropertiesCapacity
$initialPropertiesCapacity :
Collects the properties from the components detected by the ComponentDetectorClass.
__construct( $deviceData, $dynamicPropertiesExtractor)
$deviceData | ||
$dynamicPropertiesExtractor |
collectProperties( $result, $dynamicProperties = array())
Collect all the properties including dynamic properties using the passed in array of components that were found from the identifiers.
$result | ||
$dynamicProperties |
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.
$stockChild | ||
$currLevel |
A stock child component or null if none found
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.
$prevLevelComponent | ||
$component |
refineVersionSpecificComponent( $component, $dynamicProperties)
Runs a version search if the component has version-specific children and the properties already collected contains the version property.
$component | ||
$dynamicProperties |
addProperties( $properties, $component, $addParentProperties)
$properties | ||
$component | ||
$addParentProperties |