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

Class: WURFL_Handlers_Matcher_RISMatcher

Source Location: /Handlers/Matcher/RISMatcher.php

Class Overview


WURFL Reduction in String user agent matcher.


Author(s):

Implements interfaces:

Methods



Class Details

[line 26]
WURFL Reduction in String user agent matcher.

This User Agent Matcher uses its match() method to find a matching user agent by removing characters from the right side of the User Agents one-by-one until either a match is found, or the string length is lower than the specified tolerance.




Tags:



[ Top ]


Class Methods


static method INSTANCE [line 38]

static WURFL_Handlers_RISMatcher INSTANCE( )

Returns an instance of the RISMatcher singleton



Tags:

access:  public


[ Top ]

method match [line 52]

string match( $collection &$collection, $needle $needle, $tolerance $tolerance)

Returns the closest match of $needle in $collection of user agents



Tags:

return:  Device ID that matches user agent or null if not found
access:  public



Implementation of:
WURFL_Handlers_Matcher_Interface::match()
Attempts to find a matching $needle in given $collection within the specified $tolerance

Parameters:

$collection   &$collection   array Array of user agents
$needle   $needle   string substring to look for in user agent
$tolerance   $tolerance   integer Minimum required length of prefix match

[ Top ]


Documentation generated on Thu, 03 Oct 2013 19:11:54 +0000 by phpDocumentor 1.4.4