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

Class: UserAgentMatcher

Source Location: /UserAgentMatchers/UserAgentMatcher.php

Class Overview


An abstract class that all UserAgentMatchers must extend.


Author(s):

Variables

Methods


Child classes:

HTCMacUserAgentMatcher
Provides a specific user agent matching technique
SmartTVUserAgentMatcher
Provides a specific user agent matching technique
KonquerorUserAgentMatcher
Provides a specific user agent matching technique
BotUserAgentMatcher
Provides a specific user agent matching technique
NecUserAgentMatcher
Provides a specific user agent matching technique
DoCoMoUserAgentMatcher
Provides a specific user agent matching technique
PanasonicUserAgentMatcher
Provides a specific user agent matching technique
WindowsPhoneUserAgentMatcher
Provides a specific user agent matching technique
KindleUserAgentMatcher
Provides a specific user agent matching technique
SPVUserAgentMatcher
Provides a specific user agent matching technique
SharpUserAgentMatcher
Provides a specific user agent matching technique
HTCUserAgentMatcher
Provides a specific user agent matching technique
BlackBerryUserAgentMatcher
Provides a specific user agent matching technique
SonyEricssonUserAgentMatcher
Provides a specific user agent matching technique
LGUPLUSUserAgentMatcher
Provides a specific user agent matching technique
SamsungUserAgentMatcher
Provides a specific user agent matching technique
AndroidUserAgentMatcher
Provides a specific user agent matching technique
MSIEUserAgentMatcher
Provides a specific user agent matching technique
WindowsPhoneDesktopUserAgentMatcher
Provides a specific user agent matching technique
ReksioUserAgentMatcher
Provides a specific user agent matching technique
KyoceraUserAgentMatcher
Provides a specific user agent matching technique
SanyoUserAgentMatcher
Provides a specific user agent matching technique
MitsubishiUserAgentMatcher
Provides a specific user agent matching technique
AppleUserAgentMatcher
Provides a specific user agent matching technique
GrundigUserAgentMatcher
Provides a specific user agent matching technique
OperaUserAgentMatcher
Provides a specific user agent matching technique
ToshibaUserAgentMatcher
Provides a specific user agent matching technique
NokiaOviBrowserUserAgentMatcher
Provides a specific user agent matching technique
PortalmmmUserAgentMatcher
Provides a specific user agent matching technique
ChromeUserAgentMatcher
Provides a specific user agent matching technique
CatchAllUserAgentMatcher
Provides a generic user agent matching technique
NintendoUserAgentMatcher
Provides a specific user agent matching technique
KddiUserAgentMatcher
Provides a specific user agent matching technique
NokiaUserAgentMatcher
Provides a specific user agent matching technique
SafariUserAgentMatcher
Provides a specific user agent matching technique
SimpleDesktopUserAgentMatcher
Matches desktop browsers. This UserAgentMatcher is unlike the rest in that it is does not use any database functions to find a matching device. If a device is not matched with this UserAgentMatcher, another one is assigned to match it using the database.
JavaMidletUserAgentMatcher
Provides a specific user agent matching technique
PantechUserAgentMatcher
Provides a specific user agent matching technique
QtekUserAgentMatcher
Provides a specific user agent matching technique
LGUserAgentMatcher
Provides a specific user agent matching technique
PhilipsUserAgentMatcher
Provides a specific user agent matching technique
SiemensUserAgentMatcher
Provides a specific user agent matching technique
VodafoneUserAgentMatcher
Provides a specific user agent matching technique
AlcatelUserAgentMatcher
Provides a specific user agent matching technique
WebOSUserAgentMatcher
Provides a specific user agent matching technique
FirefoxUserAgentMatcher
Provides a specific user agent matching technique
MotorolaUserAgentMatcher
Provides a specific user agent matching technique
SagemUserAgentMatcher
Provides a specific user agent matching technique
BenQUserAgentMatcher
Provides a specific user agent matching technique
OperaMiniUserAgentMatcher
Provides a specific user agent matching technique

Class Details

[line 22]
An abstract class that all UserAgentMatchers must extend.



Tags:

abstract:  


[ Top ]


Class Variables

static $constantIDs = array()

[line 36]

WURFL IDs that are hardcoded in this connector. Used for compatibility testing against new WURFLs



Tags:

access:  public

Type:   array


[ Top ]

$deviceList =

[line 40]



Tags:

var:  List of WURFL IDs => User Agents. Typically used for matching user agents.
access:  public

Type:   Array


[ Top ]

$runtime_normalization =  false

[line 50]

Set to true if this UserAgentMatcher is allowed to permenantly modify the User Agent while matching



Tags:

access:  public

Type:   boolean


[ Top ]

$simulation =  false

[line 45]

If true, the matcher will not perform any RIS or LD matching



Tags:

access:  public

Type:   boolean


[ Top ]

$userAgent =

[line 31]



Tags:

access:  protected

Type:   TeraWurflUserAgent


[ Top ]

$wurfl =

[line 27]



Tags:

var:  Running instance of Tera-WURFL
access:  protected

Type:   TeraWurfl


[ Top ]



Class Methods


static method canHandle [line 79]

static boolean canHandle( TeraWurflHttpRequest $httpRequest)

Returns true if this Matcher can handle the given $httpRequest



Tags:

access:  public


Overridden in child classes as:

HTCMacUserAgentMatcher::canHandle()
SmartTVUserAgentMatcher::canHandle()
KonquerorUserAgentMatcher::canHandle()
BotUserAgentMatcher::canHandle()
NecUserAgentMatcher::canHandle()
DoCoMoUserAgentMatcher::canHandle()
PanasonicUserAgentMatcher::canHandle()
WindowsPhoneUserAgentMatcher::canHandle()
KindleUserAgentMatcher::canHandle()
SPVUserAgentMatcher::canHandle()
SharpUserAgentMatcher::canHandle()
HTCUserAgentMatcher::canHandle()
BlackBerryUserAgentMatcher::canHandle()
SonyEricssonUserAgentMatcher::canHandle()
LGUPLUSUserAgentMatcher::canHandle()
SamsungUserAgentMatcher::canHandle()
AndroidUserAgentMatcher::canHandle()
MSIEUserAgentMatcher::canHandle()
WindowsPhoneDesktopUserAgentMatcher::canHandle()
ReksioUserAgentMatcher::canHandle()
KyoceraUserAgentMatcher::canHandle()
SanyoUserAgentMatcher::canHandle()
MitsubishiUserAgentMatcher::canHandle()
AppleUserAgentMatcher::canHandle()
GrundigUserAgentMatcher::canHandle()
OperaUserAgentMatcher::canHandle()
ToshibaUserAgentMatcher::canHandle()
NokiaOviBrowserUserAgentMatcher::canHandle()
PortalmmmUserAgentMatcher::canHandle()
ChromeUserAgentMatcher::canHandle()
CatchAllUserAgentMatcher::canHandle()
NintendoUserAgentMatcher::canHandle()
KddiUserAgentMatcher::canHandle()
NokiaUserAgentMatcher::canHandle()
SafariUserAgentMatcher::canHandle()
SimpleDesktopUserAgentMatcher::canHandle()
JavaMidletUserAgentMatcher::canHandle()
PantechUserAgentMatcher::canHandle()
QtekUserAgentMatcher::canHandle()
LGUserAgentMatcher::canHandle()
PhilipsUserAgentMatcher::canHandle()
SiemensUserAgentMatcher::canHandle()
VodafoneUserAgentMatcher::canHandle()
AlcatelUserAgentMatcher::canHandle()
WebOSUserAgentMatcher::canHandle()
FirefoxUserAgentMatcher::canHandle()
MotorolaUserAgentMatcher::canHandle()
SagemUserAgentMatcher::canHandle()
BenQUserAgentMatcher::canHandle()
OperaMiniUserAgentMatcher::canHandle()

Parameters:

TeraWurflHttpRequest   $httpRequest  

[ Top ]

constructor __construct [line 55]

UserAgentMatcher __construct( TeraWurfl $wurfl)

Instantiates a new UserAgentMatcher



Tags:

access:  public


Overridden in child classes as:

CatchAllUserAgentMatcher::__construct()

Parameters:

TeraWurfl   $wurfl  

[ Top ]

method applyConclusiveMatch [line 64]

string applyConclusiveMatch( )

Attempts to find a conclusively matching WURFL ID



Tags:

return:  Matching WURFL ID
abstract:  
access:  public


Overridden in child classes as:

HTCMacUserAgentMatcher::applyConclusiveMatch()
SmartTVUserAgentMatcher::applyConclusiveMatch()
KonquerorUserAgentMatcher::applyConclusiveMatch()
BotUserAgentMatcher::applyConclusiveMatch()
NecUserAgentMatcher::applyConclusiveMatch()
DoCoMoUserAgentMatcher::applyConclusiveMatch()
PanasonicUserAgentMatcher::applyConclusiveMatch()
WindowsPhoneUserAgentMatcher::applyConclusiveMatch()
KindleUserAgentMatcher::applyConclusiveMatch()
SPVUserAgentMatcher::applyConclusiveMatch()
SharpUserAgentMatcher::applyConclusiveMatch()
HTCUserAgentMatcher::applyConclusiveMatch()
BlackBerryUserAgentMatcher::applyConclusiveMatch()
SonyEricssonUserAgentMatcher::applyConclusiveMatch()
LGUPLUSUserAgentMatcher::applyConclusiveMatch()
SamsungUserAgentMatcher::applyConclusiveMatch()
AndroidUserAgentMatcher::applyConclusiveMatch()
MSIEUserAgentMatcher::applyConclusiveMatch()
WindowsPhoneDesktopUserAgentMatcher::applyConclusiveMatch()
ReksioUserAgentMatcher::applyConclusiveMatch()
KyoceraUserAgentMatcher::applyConclusiveMatch()
SanyoUserAgentMatcher::applyConclusiveMatch()
MitsubishiUserAgentMatcher::applyConclusiveMatch()
AppleUserAgentMatcher::applyConclusiveMatch()
GrundigUserAgentMatcher::applyConclusiveMatch()
OperaUserAgentMatcher::applyConclusiveMatch()
ToshibaUserAgentMatcher::applyConclusiveMatch()
NokiaOviBrowserUserAgentMatcher::applyConclusiveMatch()
PortalmmmUserAgentMatcher::applyConclusiveMatch()
ChromeUserAgentMatcher::applyConclusiveMatch()
CatchAllUserAgentMatcher::applyConclusiveMatch()
NintendoUserAgentMatcher::applyConclusiveMatch()
KddiUserAgentMatcher::applyConclusiveMatch()
NokiaUserAgentMatcher::applyConclusiveMatch()
SafariUserAgentMatcher::applyConclusiveMatch()
SimpleDesktopUserAgentMatcher::applyConclusiveMatch()
JavaMidletUserAgentMatcher::applyConclusiveMatch()
PantechUserAgentMatcher::applyConclusiveMatch()
QtekUserAgentMatcher::applyConclusiveMatch()
LGUserAgentMatcher::applyConclusiveMatch()
PhilipsUserAgentMatcher::applyConclusiveMatch()
SiemensUserAgentMatcher::applyConclusiveMatch()
VodafoneUserAgentMatcher::applyConclusiveMatch()
AlcatelUserAgentMatcher::applyConclusiveMatch()
WebOSUserAgentMatcher::applyConclusiveMatch()
FirefoxUserAgentMatcher::applyConclusiveMatch()
MotorolaUserAgentMatcher::applyConclusiveMatch()
SagemUserAgentMatcher::applyConclusiveMatch()
BenQUserAgentMatcher::applyConclusiveMatch()
OperaMiniUserAgentMatcher::applyConclusiveMatch()

[ Top ]

method applyRecoveryMatch [line 70]


method ldMatch [line 122]

string ldMatch( [int $tolerance = null])

Attempts to match given user agent string to a device from the database by calculating their Levenshtein Distance (LD)



Tags:

return:  WURFL ID
access:  public


Parameters:

int   $tolerance   Tolerance, how much difference is allowed

[ Top ]

method matcherName [line 134]

string matcherName( )

Returns the name of the UserAgentMatcher in use



Tags:

return:  UserAgentMatcher name
access:  public


[ Top ]

method risMatch [line 95]

string risMatch( int $tolerance)

Attempts to match given user agent string to a device from the database by comparing less and less of the strings until a match is found (RIS, Reduction in String)



Tags:

return:  WURFL ID
access:  public


Parameters:

int   $tolerance   Tolerance, how many characters must match from left to right

[ Top ]

method risMatchUAPrefix [line 109]

void risMatchUAPrefix( string $prefix, [string $default = WurflConstants::NO_MATCH])

Uses RIS to match the given User Agent $prefix, using the string length of the $prefix as the tolerance. Returns device ID $default if a match is not found.



Tags:

access:  public


Parameters:

string   $prefix   The substring of the desired user agent, ex: "Mozilla/5"
string   $default   This device ID will be returned if the match fails

[ Top ]

method tableSuffix [line 141]

string tableSuffix( )

Returns the database table suffix for the current UserAgentMatcher



Tags:

return:  Table suffix
access:  public


[ Top ]

method updateDeviceList [line 86]

void updateDeviceList( )

Updates the deviceList Array to contain all the WURFL IDs that are related to the current UserAgentMatcher



Tags:

access:  protected


[ Top ]


Documentation generated on Sat, 31 Mar 2012 15:45:11 -0400 by phpDocumentor 1.4.4