PHP 클래스 BrowscapPHP\BrowscapUpdater

저자: Jonathan Stoppani ([email protected])
저자: Vítor Brandão ([email protected])
저자: Mikołaj Misiurewicz ([email protected])
저자: Christoph Ziegenberg ([email protected])
저자: Thomas Müller ([email protected])
파일 보기 프로젝트 열기: browscap/browscap-php 1 사용 예제들

공개 메소드들

메소드 설명
checkUpdate ( ) : integer | null checks if an update on a remote location for the local file or the cache
convertFile ( string $iniFile ) reads and parses an ini file and writes the results into the cache
convertString ( string $iniString ) reads and parses an ini string and writes the results into the cache
fetch ( string $file, string $remoteFile = IniLoader::PHP_INI ) fetches a remote file and stores it into a local folder
getCache ( ) : BrowscapPHP\Cache\BrowscapCacheInterface Gets a cache instance
getClient ( ) : Client
getLogger ( ) : Psr\Log\LoggerInterface returns a logger instance
setCache ( BrowscapPHP\Cache\BrowscapCacheInterface | WurflCache\Adapter\AdapterInterface $cache ) : BrowscapUpdater Sets a cache instance
setClient ( Client $client )
setLogger ( Psr\Log\LoggerInterface $logger ) : BrowscapUpdater Sets a logger instance
update ( string $remoteFile = IniLoader::PHP_INI ) fetches a remote file, parses it and writes the result into the cache

비공개 메소드들

메소드 설명
sanitizeContent ( string $content ) : mixed
storeContent ( Converter $converter, string $content, integer | null $cachedVersion ) reads and parses an ini string and writes the results into the cache

메소드 상세

checkUpdate() 공개 메소드

checks if an update on a remote location for the local file or the cache
public checkUpdate ( ) : integer | null
리턴 integer | null The actual cached version if a newer version is available, null otherwise

convertFile() 공개 메소드

reads and parses an ini file and writes the results into the cache
public convertFile ( string $iniFile )
$iniFile string

convertString() 공개 메소드

reads and parses an ini string and writes the results into the cache
public convertString ( string $iniString )
$iniString string

fetch() 공개 메소드

fetches a remote file and stores it into a local folder
public fetch ( string $file, string $remoteFile = IniLoader::PHP_INI )
$file string The name of the file where to store the remote content
$remoteFile string The code for the remote file to load

getCache() 공개 메소드

Gets a cache instance
public getCache ( ) : BrowscapPHP\Cache\BrowscapCacheInterface
리턴 BrowscapPHP\Cache\BrowscapCacheInterface

getClient() 공개 메소드

public getClient ( ) : Client
리턴 GuzzleHttp\Client

getLogger() 공개 메소드

returns a logger instance
public getLogger ( ) : Psr\Log\LoggerInterface
리턴 Psr\Log\LoggerInterface

setCache() 공개 메소드

Sets a cache instance
public setCache ( BrowscapPHP\Cache\BrowscapCacheInterface | WurflCache\Adapter\AdapterInterface $cache ) : BrowscapUpdater
$cache BrowscapPHP\Cache\BrowscapCacheInterface | WurflCache\Adapter\AdapterInterface
리턴 BrowscapUpdater

setClient() 공개 메소드

public setClient ( Client $client )
$client GuzzleHttp\Client

setLogger() 공개 메소드

Sets a logger instance
public setLogger ( Psr\Log\LoggerInterface $logger ) : BrowscapUpdater
$logger Psr\Log\LoggerInterface
리턴 BrowscapUpdater

update() 공개 메소드

if the local stored information are in the same version as the remote data no actions are taken
public update ( string $remoteFile = IniLoader::PHP_INI )
$remoteFile string The code for the remote file to load