PHP Class BrowscapPHP\Helper\Converter

Author: Christoph Ziegenberg ([email protected])
Author: Thomas Müller ([email protected])
Show file Open project: browscap/browscap-php Class Usage Examples

Public Methods

Method Description
__construct ( Psr\Log\LoggerInterface $logger, BrowscapPHP\Cache\BrowscapCacheInterface $cache ) class constructor
convertFile ( string $iniFile )
convertString ( string $iniString )
getFilesystem ( ) : Filesystem Returns a filesystem instance
getIniVersion ( string $iniString ) : integer Parses the ini data to get the version of loaded ini file
setFilesystem ( Filesystem $file ) : Converter Sets a filesystem instance
setVersion ( integer $version ) : Converter sets the version
storeVersion ( ) : Converter stores the version of the ini file into cache

Private Methods

Method Description
getIniReleaseDate ( string $iniString ) : string | null Parses the ini data to get the releaseDate of loaded ini file
getIniType ( string $iniString ) : string | null Parses the ini data to get the releaseDate of loaded ini file

Method Details

__construct() public method

class constructor
public __construct ( Psr\Log\LoggerInterface $logger, BrowscapPHP\Cache\BrowscapCacheInterface $cache )
$logger Psr\Log\LoggerInterface
$cache BrowscapPHP\Cache\BrowscapCacheInterface

convertFile() public method

public convertFile ( string $iniFile )
$iniFile string

convertString() public method

public convertString ( string $iniString )
$iniString string

getFilesystem() public method

Returns a filesystem instance
public getFilesystem ( ) : Filesystem
return Filesystem

getIniVersion() public method

Parses the ini data to get the version of loaded ini file
public getIniVersion ( string $iniString ) : integer
$iniString string The loaded ini data
return integer

setFilesystem() public method

Sets a filesystem instance
public setFilesystem ( Filesystem $file ) : Converter
$file Filesystem
return Converter

setVersion() public method

sets the version
public setVersion ( integer $version ) : Converter
$version integer
return Converter

storeVersion() public method

stores the version of the ini file into cache
public storeVersion ( ) : Converter
return Converter