PHP Class WhichBrowser\Model\Device

Inheritance: extends WhichBrowser\Model\Primitive\Base
Afficher le fichier Open project: whichbrowser/parser Class Usage Examples

Méthodes publiques

Свойство Type Description
$carrier string
$flag mixed
$generic boolean
$hidden boolean
$identified integer
$identifier integer
$manufacturer string
$model string
$series string
$subtype string
$type string

Méthodes publiques

Méthode Description
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

Method Details

getCarrier() public méthode

Get the name of the carrier in a human readable format
public getCarrier ( ) : string
Résultat string

getManufacturer() public méthode

Get the name of the manufacturer in a human readable format
public getManufacturer ( ) : string
Résultat string

getModel() public méthode

Get the name of the model in a human readable format
public getModel ( ) : string
Résultat string

identifyModel() public méthode

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
Résultat string

isDetected() public méthode

Check if device information is detected
public isDetected ( ) : boolean
Résultat boolean

reset() public méthode

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() public méthode

Declare an positive identification
public setIdentification ( array $properties ) : string
$properties array An array, the key of an element determines the name of the property
Résultat string

toArray() public méthode

Get an array of all defined properties
public toArray ( ) : array
Résultat array

toString() public méthode

Get the combined name of the manufacturer and model in a human readable format
public toString ( ) : string
Résultat string

Property Details

$carrier public_oe property

public string $carrier
Résultat string

$flag public_oe property

public mixed $flag
Résultat mixed

$generic public_oe property

public bool $generic
Résultat boolean

$hidden public_oe property

public bool $hidden
Résultat boolean

$identified public_oe property

public int $identified
Résultat integer

$identifier public_oe property

public int $identifier
Résultat integer

$manufacturer public_oe property

public string $manufacturer
Résultat string

$model public_oe property

public string $model
Résultat string

$series public_oe property

public string $series
Résultat string

$subtype public_oe property

public string $subtype
Résultat string

$type public_oe property

public string $type
Résultat string