PHP Класс WhichBrowser\Model\Device

Наследование: extends WhichBrowser\Model\Primitive\Base
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$carrier string
$flag mixed
$generic boolean
$hidden boolean
$identified integer
$identifier integer
$manufacturer string
$model string
$series string
$subtype string
$type string

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

Метод Описание
getCarrier ( ) : string Get the name of the carrier in a human readable format
getManufacturer ( ) : string Get the name of the manufacturer in a human readable format
getModel ( ) : string Get the name of the model in a human readable format
identifyModel ( string $pattern, string $subject, array | null $defaults = [] ) : string Identify the manufacturer and model based on a pattern
isDetected ( ) : boolean Check if device information is detected
reset ( array | null $properties = null ) Set the properties to the default values
setIdentification ( array $properties ) : string Declare an positive identification
toArray ( ) : array Get an array of all defined properties
toString ( ) : string Get the combined name of the manufacturer and model in a human readable format

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

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

Get the name of the carrier in a human readable format
public getCarrier ( ) : string
Результат string

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

Get the name of the manufacturer in a human readable format
public getManufacturer ( ) : string
Результат string

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

Get the name of the model in a human readable format
public getModel ( ) : string
Результат string

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

Identify the manufacturer and model based on a pattern
public identifyModel ( string $pattern, string $subject, array | null $defaults = [] ) : string
$pattern string The regular expression that defines the group that matches the model
$subject string The string the regular expression is matched with
$defaults array | null An optional array of properties to set together
Результат string

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

Check if device information is detected
public isDetected ( ) : boolean
Результат boolean

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

Set the properties to the default values
public reset ( array | null $properties = null )
$properties array | null An optional array of properties to set after setting it to the default values

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

Declare an positive identification
public setIdentification ( array $properties ) : string
$properties array An array, the key of an element determines the name of the property
Результат string

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

Get an array of all defined properties
public toArray ( ) : array
Результат array

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

Get the combined name of the manufacturer and model in a human readable format
public toString ( ) : string
Результат string

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

$carrier публичное свойство

public string $carrier
Результат string

$flag публичное свойство

public mixed $flag
Результат mixed

$generic публичное свойство

public bool $generic
Результат boolean

$hidden публичное свойство

public bool $hidden
Результат boolean

$identified публичное свойство

public int $identified
Результат integer

$identifier публичное свойство

public int $identifier
Результат integer

$manufacturer публичное свойство

public string $manufacturer
Результат string

$model публичное свойство

public string $model
Результат string

$series публичное свойство

public string $series
Результат string

$subtype публичное свойство

public string $subtype
Результат string

$type публичное свойство

public string $type
Результат string