DeviceAtlas Device API
 All Classes Namespaces Functions Variables
Static Public Member Functions | List of all members
Mobi_Mtld_DA_PropsHandler Class Reference

Static Public Member Functions

static _initPostWalkHandlers (array &$tree, $includeChangeableUserAgentProperties)
static _getValue (array &$tree, $propId, $propValId, $typed)
static _propertyFromId (array &$tree, $id)
static _convertToTyped (array &$tree, $obj, $propertyId)
static _convertToTypedByType ($obj, $type)
static _valueAsTypedFromId (array &$tree, $id, $propertyId)
static _mergeProperties (&$properties, $uaProperties)

Detailed Description

Class to provide methods and constants to handle properties.

Member Function Documentation

static Mobi_Mtld_DA_PropsHandler::_convertToTyped ( array &  $tree,
  $obj,
  $propertyId 
)
static

Convert a value to a typed object.

This function is used in the PostWalk classes as well as in this class.

Parameters
array$treePreviously generated tree
object$obj
integer$propertyId
Returns
string|integer|boolean value
static Mobi_Mtld_DA_PropsHandler::_getValue ( array &  $tree,
  $propId,
  $propValId,
  $typed 
)
static

Gets the value for the property value id and either converts it to a strong type or returns a string.

This function is used in the PostWalk classes as well as in this class.

Parameters
array&$treePreviously generated tree
integer$propIdProperty ID
integer$propValIdProperty value ID
boolean$typed
Returns
string|integer|boolean value
static Mobi_Mtld_DA_PropsHandler::_initPostWalkHandlers ( array &  $tree,
  $includeChangeableUserAgentProperties 
)
static

Prepare the user-agent rules branch before we start recognition. To maintain backwards compatibility - only do this if we have the ua rules branch

NOT for public use

Parameters
array&$tree
boolean$includeChangeableUserAgentProperties
static Mobi_Mtld_DA_PropsHandler::_mergeProperties ( $properties,
  $uaProperties 
)
static

This function merges the user-agent properties into the main properties map.

protected

Parameters
array&$properties
array&$uaProperties
Returns
array properties
static Mobi_Mtld_DA_PropsHandler::_propertyFromId ( array &  $tree,
  $id 
)
static

Returns the name for a property's coded ID.

This function is used in the PostWalk classes as well as in this class.

Parameters
array&$treePreviously generated tree
integer$id
Returns
string property
static Mobi_Mtld_DA_PropsHandler::_valueAsTypedFromId ( array &  $tree,
  $id,
  $propertyId 
)
static

Returns the property value typed using PHP function settype().

This function is used in the PostWalk classes as well as in this class. private

Parameters
array&$treePreviously generated tree
integer$id
integer$propertyId
Returns
string|integer|boolean value

The documentation for this class was generated from the following file: