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:

AlcatelUserAgentMatcher
Provides a specific user agent matching technique
AndroidUserAgentMatcher
Provides a specific user agent matching technique
AOLUserAgentMatcher
Provides a specific user agent matching technique
AppleUserAgentMatcher
Provides a specific user agent matching technique
BenQUserAgentMatcher
Provides a specific user agent matching technique
BlackBerryUserAgentMatcher
Provides a specific user agent matching technique
BotUserAgentMatcher
Provides a specific user agent matching technique
CatchAllUserAgentMatcher
Provides a generic user agent matching technique
ChromeUserAgentMatcher
Provides a specific user agent matching technique
DoCoMoUserAgentMatcher
Provides a specific user agent matching technique
FirefoxUserAgentMatcher
Provides a specific user agent matching technique
GrundigUserAgentMatcher
Provides a specific user agent matching technique
HTCUserAgentMatcher
Provides a specific user agent matching technique
KddiUserAgentMatcher
Provides a specific user agent matching technique
KonquerorUserAgentMatcher
Provides a specific user agent matching technique
KyoceraUserAgentMatcher
Provides a specific user agent matching technique
LGUserAgentMatcher
Provides a specific user agent matching technique
MitsubishiUserAgentMatcher
Provides a specific user agent matching technique
MotorolaUserAgentMatcher
Provides a specific user agent matching technique
MSIEUserAgentMatcher
Provides a specific user agent matching technique
NecUserAgentMatcher
Provides a specific user agent matching technique
NintendoUserAgentMatcher
Provides a specific user agent matching technique
NokiaUserAgentMatcher
Provides a specific user agent matching technique
OperaMiniUserAgentMatcher
Provides a specific user agent matching technique
OperaUserAgentMatcher
Provides a specific user agent matching technique
PanasonicUserAgentMatcher
Provides a specific user agent matching technique
PantechUserAgentMatcher
Provides a specific user agent matching technique
PhilipsUserAgentMatcher
Provides a specific user agent matching technique
PortalmmmUserAgentMatcher
Provides a specific user agent matching technique
QtekUserAgentMatcher
Provides a specific user agent matching technique
SafariUserAgentMatcher
Provides a specific user agent matching technique
SagemUserAgentMatcher
Provides a specific user agent matching technique
SamsungUserAgentMatcher
Provides a specific user agent matching technique
SanyoUserAgentMatcher
Provides a specific user agent matching technique
SharpUserAgentMatcher
Provides a specific user agent matching technique
SiemensUserAgentMatcher
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.
SonyEricssonUserAgentMatcher
Provides a specific user agent matching technique
SPVUserAgentMatcher
Provides a specific user agent matching technique
ToshibaUserAgentMatcher
Provides a specific user agent matching technique
VodafoneUserAgentMatcher
Provides a specific user agent matching technique
WindowsCEUserAgentMatcher
Provides a specific user agent matching technique

Class Details

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



Tags:

abstract:  


[ Top ]


Class Variables

static $constantIDs = array()

[line 29]

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



Tags:

access:  public

Type:   array


[ Top ]

$deviceList =

[line 33]



Tags:

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

Type:   Array


[ Top ]

$wurfl =

[line 24]



Tags:

var:  Running instance of Tera-WURFL
access:  protected

Type:   TeraWurfl


[ Top ]



Class Methods


static method contains [line 117]

static Bool contains( String $ua, String $find)

Check if user agent contains target string



Tags:

access:  public


Parameters:

String   $ua   User agent
String   $find   Target string or array of strings

[ Top ]

static method regexContains [line 153]

static Bool regexContains( String $ua, $find $find)

Check if user agent contains another string using PCRE (Perl Compatible Reqular Expressions)



Tags:

access:  public


Parameters:

String   $ua   User agent
$find   $find   Target regex string or array of regex strings

[ Top ]

static method startsWith [line 135]

static Bool startsWith( String $ua, String $find)

Check if user agent starts with target string



Tags:

access:  public


Parameters:

String   $ua   User agent
String   $find   Target string or array of strings

[ Top ]

constructor __construct [line 35]

UserAgentMatcher __construct( $wurfl)



Tags:

access:  public


Overridden in child classes as:

AlcatelUserAgentMatcher::__construct()
AndroidUserAgentMatcher::__construct()
AOLUserAgentMatcher::__construct()
AppleUserAgentMatcher::__construct()
BenQUserAgentMatcher::__construct()
BlackBerryUserAgentMatcher::__construct()
BotUserAgentMatcher::__construct()
CatchAllUserAgentMatcher::__construct()
ChromeUserAgentMatcher::__construct()
DoCoMoUserAgentMatcher::__construct()
FirefoxUserAgentMatcher::__construct()
GrundigUserAgentMatcher::__construct()
HTCUserAgentMatcher::__construct()
KddiUserAgentMatcher::__construct()
KonquerorUserAgentMatcher::__construct()
KyoceraUserAgentMatcher::__construct()
LGUserAgentMatcher::__construct()
MitsubishiUserAgentMatcher::__construct()
MotorolaUserAgentMatcher::__construct()
MSIEUserAgentMatcher::__construct()
NecUserAgentMatcher::__construct()
NintendoUserAgentMatcher::__construct()
NokiaUserAgentMatcher::__construct()
OperaMiniUserAgentMatcher::__construct()
OperaUserAgentMatcher::__construct()
PanasonicUserAgentMatcher::__construct()
PantechUserAgentMatcher::__construct()
PhilipsUserAgentMatcher::__construct()
PortalmmmUserAgentMatcher::__construct()
QtekUserAgentMatcher::__construct()
SafariUserAgentMatcher::__construct()
SagemUserAgentMatcher::__construct()
SamsungUserAgentMatcher::__construct()
SanyoUserAgentMatcher::__construct()
SharpUserAgentMatcher::__construct()
SiemensUserAgentMatcher::__construct()
SimpleDesktopUserAgentMatcher::__construct()
SonyEricssonUserAgentMatcher::__construct()
SPVUserAgentMatcher::__construct()
ToshibaUserAgentMatcher::__construct()
VodafoneUserAgentMatcher::__construct()
WindowsCEUserAgentMatcher::__construct()

Parameters:

TeraWurfl   $wurfl  

[ Top ]

method applyConclusiveMatch [line 44]

String applyConclusiveMatch( String $ua)

Attempts to find a conclusively matching WURFL ID from a given user agent



Tags:

return:  Matching WURFL ID
abstract:  
access:  public


Overridden in child classes as:

AlcatelUserAgentMatcher::applyConclusiveMatch()
AndroidUserAgentMatcher::applyConclusiveMatch()
AOLUserAgentMatcher::applyConclusiveMatch()
AppleUserAgentMatcher::applyConclusiveMatch()
BenQUserAgentMatcher::applyConclusiveMatch()
BlackBerryUserAgentMatcher::applyConclusiveMatch()
BotUserAgentMatcher::applyConclusiveMatch()
CatchAllUserAgentMatcher::applyConclusiveMatch()
ChromeUserAgentMatcher::applyConclusiveMatch()
DoCoMoUserAgentMatcher::applyConclusiveMatch()
FirefoxUserAgentMatcher::applyConclusiveMatch()
GrundigUserAgentMatcher::applyConclusiveMatch()
HTCUserAgentMatcher::applyConclusiveMatch()
KddiUserAgentMatcher::applyConclusiveMatch()
KonquerorUserAgentMatcher::applyConclusiveMatch()
KyoceraUserAgentMatcher::applyConclusiveMatch()
LGUserAgentMatcher::applyConclusiveMatch()
MitsubishiUserAgentMatcher::applyConclusiveMatch()
MotorolaUserAgentMatcher::applyConclusiveMatch()
MSIEUserAgentMatcher::applyConclusiveMatch()
NecUserAgentMatcher::applyConclusiveMatch()
NintendoUserAgentMatcher::applyConclusiveMatch()
NokiaUserAgentMatcher::applyConclusiveMatch()
OperaMiniUserAgentMatcher::applyConclusiveMatch()
OperaUserAgentMatcher::applyConclusiveMatch()
PanasonicUserAgentMatcher::applyConclusiveMatch()
PantechUserAgentMatcher::applyConclusiveMatch()
PhilipsUserAgentMatcher::applyConclusiveMatch()
PortalmmmUserAgentMatcher::applyConclusiveMatch()
QtekUserAgentMatcher::applyConclusiveMatch()
SafariUserAgentMatcher::applyConclusiveMatch()
SagemUserAgentMatcher::applyConclusiveMatch()
SamsungUserAgentMatcher::applyConclusiveMatch()
SanyoUserAgentMatcher::applyConclusiveMatch()
SharpUserAgentMatcher::applyConclusiveMatch()
SiemensUserAgentMatcher::applyConclusiveMatch()
SimpleDesktopUserAgentMatcher::applyConclusiveMatch()
SonyEricssonUserAgentMatcher::applyConclusiveMatch()
SPVUserAgentMatcher::applyConclusiveMatch()
ToshibaUserAgentMatcher::applyConclusiveMatch()
VodafoneUserAgentMatcher::applyConclusiveMatch()
WindowsCEUserAgentMatcher::applyConclusiveMatch()

Parameters:

String   $ua   User agent

[ Top ]

method applyRecoveryMatch [line 51]

String applyRecoveryMatch( String $ua)

Attempts to find a loosely matching WURFL ID from a given user agent



Tags:

return:  Matching WURFL ID
access:  public


Parameters:

String   $ua   User agent

[ Top ]

method ldMatch [line 89]

String ldMatch( String $ua, [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:

String   $ua   User agent
int   $tolerance   Tolerance, how much difference is allowed

[ Top ]

method matcherName [line 100]

String matcherName( )

Returns the name of the UserAgentMatcher in use



Tags:

return:  UserAgentMatcher name
access:  public


[ Top ]

method recoveryMatch [line 59]


method risMatch [line 76]

String risMatch( String $ua, 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:

String   $ua   User agent
int   $tolerance   Tolerance, how many characters must match from left to right

[ Top ]

method tableSuffix [line 107]

String tableSuffix( )

Returns the database table suffix for the current UserAgentMatcher



Tags:

return:  Table suffix
access:  public


[ Top ]

method updateDeviceList [line 66]

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 Sun, 19 Sep 2010 00:16:07 +0000 by phpDocumentor 1.4.3