TeraWurfl
[ class tree: TeraWurfl ] [ index: TeraWurfl ] [ all elements ]

Class: TeraWurfl

Source Location: /TeraWurfl.php

Class Overview


The main Tera-WURFL Class, provides all end-user methods and properties for interacting with Tera-WURFL


Variables

Methods



Class Details

[line 33]
The main Tera-WURFL Class, provides all end-user methods and properties for interacting with Tera-WURFL



[ Top ]


Class Variables

static $required_php_version =  "5.0.0"

[line 97]

The required version of PHP for this release



Tags:

access:  public

Type:   String


[ Top ]

static $SETTING_LOADED_DATE =  'loaded_date'

[line 37]



Tags:

access:  public

Type:   mixed


[ Top ]

static $SETTING_PATCHES_LOADED =  'patches_loaded'

[line 38]



Tags:

access:  public

Type:   mixed


[ Top ]

static $SETTING_WURFL_DATE =  'wurfl_date'

[line 36]



Tags:

access:  public

Type:   mixed


[ Top ]

static $SETTING_WURFL_VERSION =  'wurfl_version'

[line 35]



Tags:

access:  public

Type:   mixed


[ Top ]

$capabilities =

[line 48]

Array of WURFL capabilities of the requested device



Tags:

access:  public

Type:   Array


[ Top ]

$db =  false

[line 56]

Database connector to be used, must extend TeraWurflDatabase. All database functions are performed in the database connector through its methods and properties.



Tags:

see:  TeraWurflDatabase
see:  TeraWurflDatabase_MySQL5
access:  public

Type:   TeraWurflDatabase


[ Top ]

$errors =

[line 43]

Array of errors that were encountered while processing the request



Tags:

access:  public

Type:   Array


[ Top ]

$foundInCache =

[line 81]

Was the evaluated device found in the cache



Tags:

access:  public

Type:   Bool


[ Top ]

$httpAccept =

[line 71]

The HTTP Accept header that is being evaluated



Tags:

access:  public

Type:   String


[ Top ]

$lookup_end =

[line 108]

Lookup end time



Tags:

access:  protected

Type:   int


[ Top ]

$lookup_start =

[line 103]

Lookup start time



Tags:

access:  protected

Type:   int


[ Top ]

$matchData =

[line 119]

The Tera-WURFL specific data that is added to the capabilities array



Tags:

access:  protected

Type:   array


[ Top ]

$matchDataKey =  "tera_wurfl"

[line 114]

The array key that is returned as a WURFL capability group in the capabilities

array that stored Tera-WURFL specific information about the request




Tags:

access:  protected

Type:   String


[ Top ]

$matcherHistory =

[line 124]

Array of UserAgentMatchers and match attempt types that the API used to find a matching device



Tags:

access:  protected

Type:   Array


[ Top ]

$maxDeviceDepth =  40

[line 129]



Tags:

access:  protected

Type:   mixed


[ Top ]

$release_branch =  "Stable"

[line 87]

The installed branch of Tera-WURFL



Tags:

access:  public

Type:   String


[ Top ]

$release_version =  "2.1.3"

[line 92]

The installed version of Tera-WURFL



Tags:

access:  public

Type:   String


[ Top ]

$rootdir =

[line 61]

The directory that TeraWurfl.php is in



Tags:

access:  public

Type:   String


[ Top ]

$userAgent =

[line 66]

The user agent that is being evaluated



Tags:

access:  public

Type:   String


[ Top ]

$userAgentMatcher =

[line 76]

The UserAgentMatcher that is currently in use



Tags:

access:  public

Type:   UserAgentMatcher


[ Top ]



Class Methods


static method absoluteDataDir [line 522]

static String absoluteDataDir( )

Get the absolute path to the data directory on the filesystem



Tags:

return:  Absolute path to data directory
access:  public


[ Top ]

static method mergeCapabilities [line 496]

static void mergeCapabilities( &$baseDevice, $addedDevice)

Merges given $addedDevice array onto $baseDevice array



Tags:

access:  public


Parameters:

Array   &$baseDevice   Main capabilities array
Array   $addedDevice   New capabilities array

[ Top ]

constructor __construct [line 132]

TeraWurfl __construct( )



Tags:

access:  public


[ Top ]

method addCapabilities [line 480]

void addCapabilities( $newCapabilities)

Add new capabilities to the capabilities array



Tags:

access:  public


Parameters:

Array   $newCapabilities   Capabilities that are to be added

[ Top ]

method addTopLevelSettings [line 469]

void addTopLevelSettings( $newCapabilities)

Adds the top level properties to the capabilities array, like id and user_agent



Tags:

access:  public


Parameters:

Array   $newCapabilities   New properties to be added

[ Top ]

method fullTableName [line 432]

void fullTableName( )



Tags:

access:  public


[ Top ]

method getDeviceCapabilitiesFromAgent [line 263]

Bool getDeviceCapabilitiesFromAgent( [String $userAgent = null], [String $httpAccept = null])

Detects the capabilities of a device from a given user agent and optionally, the HTTP Accept Headers



Tags:

return:  matching device was found
access:  public


Parameters:

String   $userAgent   HTTP User Agent
String   $httpAccept   HTTP Accept Header

[ Top ]

method getDeviceCapabilitiesFromRequest [line 253]

Bool getDeviceCapabilitiesFromRequest( Array $server)

Detects the capabilities from a given request object ($_SERVER)



Tags:

return:  Match
access:  public


Parameters:

Array   $server   Request object ($_SERVER contains this data)

[ Top ]

method getDeviceCapability [line 407]

Mixed getDeviceCapability( String $capability)

Returns the value of the requested capability for the detected device



Tags:

return:  Capability value
access:  public


Parameters:

String   $capability   Capability name (e.g. "is_wireless_device")

[ Top ]

method getDeviceIDFromUALoose [line 149]

String getDeviceIDFromUALoose( )

Returns the matching WURFL ID for a given User Agent



Tags:

return:  WURFL ID
access:  protected


[ Top ]

method getFullCapabilities [line 324]

void getFullCapabilities( String $deviceID)

Builds the full capabilities array from the WURFL ID



Tags:

access:  public


Parameters:

String   $deviceID   WURFL ID

[ Top ]

method getSetting [line 429]

void getSetting( String $key)

Returns the value of the given setting name



Tags:

access:  public


Parameters:

String   $key   Setting value

[ Top ]

method setMatcherHistory [line 487]

void setMatcherHistory( )

Combines the MatcherHistory array into a string and stores it in the matchData



Tags:

access:  protected


[ Top ]

method toLog [line 443]

void toLog( String $text, [Int $requestedLogLevel = LOG_NOTICE], [String $func = "Tera-WURFL"])

Log an error in the Tera-WURFL log file



Tags:

see:  TeraWurflConfig
access:  public


Parameters:

String   $text   The error message text
Int   $requestedLogLevel   The log level / severity of the error
String   $func   The function or code that was being run when the error occured

[ Top ]


Documentation generated on Sun, 19 Sep 2010 00:15:56 +0000 by phpDocumentor 1.4.3