PHP Класс DeviceDetector\Parser\Device\DeviceParserAbstract

Abstract class for all device parsers
Наследование: extends DeviceDetector\Parser\ParserAbstract
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$deviceBrands array Note: Before using a new brand in on of the regex files, it needs to be added here

Защищенные свойства (Protected)

Свойство Тип Описание
$brand
$deviceType
$deviceTypes array Detectable device types
$model

Открытые методы

Метод Описание
getAvailableDeviceTypeNames ( ) : array Returns names of all available device types
getAvailableDeviceTypes ( ) : array Returns available device types
getBrand ( ) : string Returns the detected device brand
getDeviceName ( integer $deviceType ) : mixed Returns the name of the given device type
getDeviceType ( )
getFullName ( string $brandId ) : string Returns the full brand name for the given short name
getModel ( ) : string Returns the detected device model
parse ( )
setUserAgent ( string $userAgent ) Sets the useragent to be parsed

Защищенные методы

Метод Описание
buildModel ( $model, $matches )
reset ( )

Описание методов

buildModel() защищенный Метод

protected buildModel ( $model, $matches )

getAvailableDeviceTypeNames() публичный статический Метод

Returns names of all available device types
public static getAvailableDeviceTypeNames ( ) : array
Результат array

getAvailableDeviceTypes() публичный статический Метод

Returns available device types
public static getAvailableDeviceTypes ( ) : array
Результат array

getBrand() публичный Метод

Returns the detected device brand
public getBrand ( ) : string
Результат string

getDeviceName() публичный статический Метод

Returns the name of the given device type
public static getDeviceName ( integer $deviceType ) : mixed
$deviceType integer one of the DEVICE_TYPE_* constants
Результат mixed

getDeviceType() публичный Метод

public getDeviceType ( )

getFullName() публичный статический Метод

Returns the full brand name for the given short name
public static getFullName ( string $brandId ) : string
$brandId string short brand name
Результат string

getModel() публичный Метод

Returns the detected device model
public getModel ( ) : string
Результат string

parse() публичный Метод

public parse ( )

reset() защищенный Метод

protected reset ( )

setUserAgent() публичный Метод

Sets the useragent to be parsed
public setUserAgent ( string $userAgent )
$userAgent string

Описание свойств

$brand защищенное свойство

protected $brand

$deviceBrands публичное статическое свойство

Note: Before using a new brand in on of the regex files, it needs to be added here
public static array $deviceBrands
Результат array

$deviceType защищенное свойство

protected $deviceType

$deviceTypes защищенное статическое свойство

Detectable device types
protected static array $deviceTypes
Результат array

$model защищенное свойство

protected $model