PHP Class DeviceDetector\Parser\OperatingSystem

Parses the useragent for operating system information Detected operating systems can be found in self::$operatingSystems and /regexes/oss.yml This class also defined some operating system families and methods to get the family for a specific os
Inheritance: extends ParserAbstract
ファイルを表示 Open project: piwik/device-detector Class Usage Examples

Protected Properties

Property Type Description
$fixtureFile
$operatingSystems array Known operating systems mapped to their internal short codes
$osFamilies array Operating system families mapped to the short codes of the associated operating systems
$parserName

Public Methods

Method Description
getAvailableOperatingSystemFamilies ( ) : array Returns all available operating system families
getAvailableOperatingSystems ( ) : array Returns all available operating systems
getNameFromId ( $os, boolean $ver = false ) : boolean | string Returns the full name for the given short name
getOsFamily ( $osLabel ) : boolean | string Returns the operating system family for the given operating system
parse ( )

Protected Methods

Method Description
parsePlatform ( )

Method Details

getAvailableOperatingSystemFamilies() public static method

Returns all available operating system families
public static getAvailableOperatingSystemFamilies ( ) : array
return array

getAvailableOperatingSystems() public static method

Returns all available operating systems
public static getAvailableOperatingSystems ( ) : array
return array

getNameFromId() public static method

Returns the full name for the given short name
public static getNameFromId ( $os, boolean $ver = false ) : boolean | string
$os
$ver boolean
return boolean | string

getOsFamily() public static method

Returns the operating system family for the given operating system
public static getOsFamily ( $osLabel ) : boolean | string
$osLabel
return boolean | string If false, "Unknown"

parse() public method

public parse ( )

parsePlatform() protected method

protected parsePlatform ( )

Property Details

$fixtureFile protected_oe property

protected $fixtureFile

$operatingSystems protected_oe static_oe property

Known operating systems mapped to their internal short codes
protected static array $operatingSystems
return array

$osFamilies protected_oe static_oe property

Operating system families mapped to the short codes of the associated operating systems
protected static array $osFamilies
return array

$parserName protected_oe property

protected $parserName