PHP Класс Browscap\Data\Expander

Автор: Thomas Müller ([email protected])
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
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

Приватные методы

Метод Описание
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

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

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

public expand ( Division $division, string $divisionName ) : array
$division Division
$divisionName string
Результат array

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

Get the data collection
public getDataCollection ( ) : DataCollection
Результат DataCollection

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

public getLogger ( ) : Psr\Log\LoggerInterface
Результат Psr\Log\LoggerInterface $logger

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

splits a version into the major and the minor version
public getVersionParts ( string $version ) : string[]
$version string
Результат string[]

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

Render the property of a single User Agent
public parseProperty ( string $value, string $majorVer, string $minorVer ) : string
$value string
$majorVer string
$minorVer string
Результат string

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

Set the data collection
public setDataCollection ( DataCollection $collection ) : Expander
$collection DataCollection
Результат Expander

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

public setLogger ( Psr\Log\LoggerInterface $logger ) : Expander
$logger Psr\Log\LoggerInterface
Результат Expander

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

trims the value of a property and converts the string values "true" and "false" to boolean
public trimProperty ( string $propertyValue ) : string | boolean
$propertyValue string
Результат string | boolean