Static Public Member Functions |
static | propertyTypeCheck ($cookie, $property, $typePrefix) |
Public Attributes |
const | CP_RULES = "cpr" |
const | USER_AGENT = "ua" |
const | OPERATOR_EQUALS = "=" |
const | OPERATOR_NOT_EQUALS = "!=" |
const | OPERATOR_LESS_THAN = "<" |
const | OPERATOR_LESS_THAN_EQUALS = "<=" |
const | OPERATOR_GREATER_THAN = ">" |
const | OPERATOR_GREATER_THAN_EQUALS = ">=" |
const | PROPERTY_NAME_ALLOWED_CHARS_PATTERN = '/^[a-z0-9.]+$/i' |
const | RULE_GROUPS = "rg" |
const | PROPERTY_MATCHER = "p" |
const | PROPERTY = "p" |
const | PROPERTY_VALUE = "v" |
const | OPERATOR = "o" |
const | RULE_ARR = "r" |
const | RULE_PROP_IDS_IN_USE = "rpids" |
const | MATCHER_PROP_IDS_IN_USE = "mpids" |
const | RULE_SET = "t" |
const | RULE_SET_COUNT = "tc" |
Additional Inherited Members |
| $tree |
| $branch |
| $propertyNameToId |
| $propertyIdToType |
Member Function Documentation
Mobi_Mtld_DA_ClientProps::_initGetMatcherPropertyIds |
( |
|
$group, |
|
|
|
$propIds |
|
) |
| |
|
protected |
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
- Parameters
-
array | $groups | The rule group that can contain a property matcher |
array | $propIds | The set of found property IDs |
- Returns
- An updated set of property IDs
Reimplemented from Mobi_Mtld_DA_PostWalkRules.
Mobi_Mtld_DA_ClientProps::_initRuleSets |
( |
|
$group | ) |
|
|
protected |
Prepare the rule set by extracting it from the current group and wrapping it in an array. This is done to remain compatible with initGetRulePropertyIds()
- Parameters
-
array | $group | The current parent group. |
- Returns
- A list of all rule sets
Reimplemented from Mobi_Mtld_DA_PostWalkRules.
Mobi_Mtld_DA_ClientProps::getClientProperty |
( |
|
$propertyId, |
|
|
|
$propertyName, |
|
|
array |
$parsedCookie, |
|
|
|
$typedValues |
|
) |
| |
Try and get a property from only the passed client cookie
- Parameters
-
integer | $propertyId | |
string | $propertyName | |
array | $parsedCookie | |
boolean | $typedValues | |
- Returns
- array
Mobi_Mtld_DA_ClientProps::getProperties |
( |
|
$detectedProperties, |
|
|
|
$clientProperties, |
|
|
|
$typedValues |
|
) |
| |
Merge the tree walk properties with the client side properties and run any additional rules based on the client side and tree walk properties. The rules can define replacement or additional values for properties and can also provide a new User-Agent to be used for a second tree walk. This is typically a fake User-Agent mapped to a device that cannot normally be detected such as the various iPhone models.
- Parameters
-
array | $detectedProperties | The results of the tree walk, map of property id to value id |
array | $clientProperties | |
boolean | $typedValues | Whether to return typed values or string values |
- Returns
- array of properties or NULL if there are no properties
Mobi_Mtld_DA_ClientProps::parseClientSideProperties |
( |
|
$propStr, |
|
|
|
$typedValues |
|
) |
| |
Parse the client side properties and if typed values is set convert the values to the appropiate type.
The propStr is of the form: bjs.webGl:1|bjs.geoLocation:1|sdeviceAspectRatio:16/10|iusableDisplayHeight:1050
The first character of the property name is the type of the value.
- Parameters
-
string | $propStr | |
boolean | $typedValues | |
- Returns
- array
- Exceptions
-
static Mobi_Mtld_DA_ClientProps::propertyTypeCheck |
( |
|
$cookie, |
|
|
|
$property, |
|
|
|
$typePrefix |
|
) |
| |
|
static |
Check if a given property exists with a certain type. This follows the same logic as the Api::propertyTypeCheck() in that it really checks if a property exists and if it has the correct type.
- Parameters
-
$cookie | The cookie string |
$property | The property name to check |
$typePrefix | The type of the property (s,b,i,d) |
The documentation for this class was generated from the following file:
- src/Mobi/Mtld/DA/ClientProps.php