Property | Type | Description | |
---|---|---|---|
$cache | DeviceDetector\Cache\Cache | |
||
$fixtureFile | string | Holds the path to the yml file containing regexes | |
$globalMethods | array | Holds an array with method that should be available global | |
$maxMinorParts | integer | Indicates how deep versioning will be detected if $maxMinorParts is 0 only the major version will be returned | |
$parserName | string | Holds the internal name of the parser Used for caching | |
$regexList | array | Holds an array with regexes to parse, if already loaded | |
$userAgent | string | Holds the user agent the should be parsed | |
$yamlParser | DeviceDetector\Yaml\Parser |
Method | Description | |
---|---|---|
__construct ( $ua = '' ) | ||
getCache ( ) : DeviceDetector\Cache\Cache | |
Returns Cache object | |
getName ( ) : string | Returns the internal name of the parser | |
getYamlParser ( ) : DeviceDetector\Yaml\Parser | Returns Cache object | |
parse ( ) | ||
setCache ( DeviceDetector\Cache\Cache | |
Sets the Cache class | |
setUserAgent ( string $ua ) | Sets the user agent to parse | |
setVersionTruncation ( integer | null $type ) | Set how DeviceDetector should return versions | |
setYamlParser ( $yamlParser ) | Sets the Cache class |
Method | Description | |
---|---|---|
buildByMatch ( string $item, array $matches ) : string | ||
buildVersion ( $versionString, $matches ) : mixed | string | Builds the version with the given $versionString and $matches | |
getRegexes ( ) : array | Returns the result of the parsed yml file defined in $fixtureFile | |
getRegexesDirectory ( ) : string | ||
matchUserAgent ( $regex ) : array | boolean | Matches the useragent against the given regex | |
preMatchOverall ( ) : boolean | Tests the useragent against a combination of all regexes |
protected buildVersion ( $versionString, $matches ) : mixed | string | ||
$versionString | ||
$matches | ||
return | mixed | string |
public getCache ( ) : DeviceDetector\Cache\Cache | |
||
return | DeviceDetector\Cache\Cache | |
protected getRegexes ( ) : array | ||
return | array |
public getYamlParser ( ) : DeviceDetector\Yaml\Parser | ||
return | DeviceDetector\Yaml\Parser |
protected matchUserAgent ( $regex ) : array | boolean | ||
$regex | ||
return | array | boolean |
protected preMatchOverall ( ) : boolean | ||
return | boolean |
public setCache ( DeviceDetector\Cache\Cache | |
||
$cache | DeviceDetector\Cache\Cache | |
public setUserAgent ( string $ua ) | ||
$ua | string | user agent |
public static setVersionTruncation ( integer | null $type ) | ||
$type | integer | null | Any of the VERSION_TRUNCATION_* constants |
protected Cache,DeviceDetector\Cache|CacheProvider,Doctrine\Common\Cache $cache | ||
return | DeviceDetector\Cache\Cache | |
protected string $fixtureFile | ||
return | string |
protected array $globalMethods | ||
return | array |
protected static int $maxMinorParts | ||
return | integer |
protected string $parserName | ||
return | string |
protected array $regexList | ||
return | array |
protected string $userAgent | ||
return | string |