PHP Class Browscap\Data\Expander

Author: Thomas Müller ([email protected])
Afficher le fichier Open project: browscap/browscap Class Usage Examples

Méthodes publiques

Méthode Description
expand ( Division $division, string $divisionName ) : array
getDataCollection ( ) : DataCollection Get the data collection
getLogger ( ) : Psr\Log\LoggerInterface
getVersionParts ( string $version ) : string[] splits a version into the major and the minor version
parseProperty ( string $value, string $majorVer, string $minorVer ) : string Render the property of a single User Agent
setDataCollection ( DataCollection $collection ) : Expander Set the data collection
setLogger ( Psr\Log\LoggerInterface $logger ) : Expander
trimProperty ( string $propertyValue ) : string | boolean trims the value of a property and converts the string values "true" and "false" to boolean

Private Methods

Méthode Description
checkEngineData ( array $properties, string $message ) checks if platform properties are set inside a properties array
checkPlatformData ( array $properties, string $message ) checks if platform properties are set inside a properties array
expandProperties ( array $allInputDivisions ) : array expands all properties for all useragents to make sure all properties are set and make it possible to skip incomplete properties and remove duplicate definitions
parseChildren ( string $ua, array $uaDataChild, boolean $lite = true, boolean $standard = true ) : array[] Render the children section in a single User Agent block
parseDivision ( Division $division, string $divisionName ) : array Render a single division
parseUserAgent ( array $uaData, boolean $lite, boolean $standard, integer $sortIndex, string $divisionName ) : array Render a single User Agent block

Method Details

expand() public méthode

public expand ( Division $division, string $divisionName ) : array
$division Division
$divisionName string
Résultat array

getDataCollection() public méthode

Get the data collection
public getDataCollection ( ) : DataCollection
Résultat DataCollection

getLogger() public méthode

public getLogger ( ) : Psr\Log\LoggerInterface
Résultat Psr\Log\LoggerInterface $logger

getVersionParts() public méthode

splits a version into the major and the minor version
public getVersionParts ( string $version ) : string[]
$version string
Résultat string[]

parseProperty() public méthode

Render the property of a single User Agent
public parseProperty ( string $value, string $majorVer, string $minorVer ) : string
$value string
$majorVer string
$minorVer string
Résultat string

setDataCollection() public méthode

Set the data collection
public setDataCollection ( DataCollection $collection ) : Expander
$collection DataCollection
Résultat Expander

setLogger() public méthode

public setLogger ( Psr\Log\LoggerInterface $logger ) : Expander
$logger Psr\Log\LoggerInterface
Résultat Expander

trimProperty() public méthode

trims the value of a property and converts the string values "true" and "false" to boolean
public trimProperty ( string $propertyValue ) : string | boolean
$propertyValue string
Résultat string | boolean