Public Member Functions | |
__construct (array &$tree, $type) | |
propIsOutput ($propertyId) | |
getRequiredProperties () |
Protected Member Functions | |
_initGetMatcherPropertyIds ($group, $propIds) | |
_initRuleSets ($group) |
Protected Attributes | |
$tree | |
$branch | |
$propertyNameToId | |
$propertyIdToType |
This class is used by the main Api class and should not be used directly.
This class tries to extract properties from the User-Agent string itself. This is a completely separate step to the main JSON tree walk but uses the results of the tree walk to optimise the property extraction. The property extraction is done in two steps.
Step 1: Try and identify the type of User-Agent and thus the set of property extraction rules to run. This is optimised by the properties from the tree walk.
Step 2: Run the rules found in step 1 to try and extract the properties.
|
abstractprotected |
Find all the properties that are used for matching. This is needed in case the Api.getProperty() function is called as we need these properties for the rules to work correctly
array | $group | The rule group that can contain a property matcher |
array | $propIds | The list of found property IDs |
Reimplemented in Mobi_Mtld_DA_ClientProps, and Mobi_Mtld_DA_UaProps.
|
abstractprotected |
Prepare the rule set
array | $group | The current parent group. |
Reimplemented in Mobi_Mtld_DA_ClientProps, and Mobi_Mtld_DA_UaProps.
Mobi_Mtld_DA_PostWalkRules::getRequiredProperties | ( | ) |
Get a list of all the required properties that are needed for this class to properly run its rules.
structure:
$propertyId => 1
Used with $sought
Mobi_Mtld_DA_PostWalkRules::propIsOutput | ( | $propertyId | ) |
Check if the property is used in the rules and so can be found from them. This is used in Api.getProperty() to avoid calling the methods in the class if the property that is being looked for cannot be found here.
integer | $propertyId | The ID of the property that is sought |