메소드 | 설명 | |
---|---|---|
__construct ( array $config = [], Psr\Log\LoggerInterface $logger = null ) | ||
addToCache ( string $key, |
Add the given SiteConfig to the cache. | |
build ( string $host, boolean $exactHostMatch = false ) : false | |
Returns SiteConfig instance (joined in order: exact match, wildcard, fingerprint, global, default). | |
buildForHost ( string $host, boolean $addToCache = true ) : |
Build a config file from a host. | |
buildFromUrl ( string $url, boolean $addToCache = true ) : |
Build a config file from an url. | |
create ( ) : |
Create a new config. | |
getCachedVersion ( string $key ) : boolean | |
Determine if a Config is already cached. | |
loadSiteConfig ( string $host, boolean $exactHostMatch = false ) : false | |
Returns SiteConfig instance if an appropriate one is found, false otherwise. | |
mergeConfig ( |
Append a configuration from to an existing one. | |
parseLines ( array $lines ) : |
Parse line from the config file to build the config. | |
setLogger ( Psr\Log\LoggerInterface $logger ) |
public __construct ( array $config = [], Psr\Log\LoggerInterface $logger = null ) | ||
$config | array | |
$logger | Psr\Log\LoggerInterface |
public addToCache ( string $key, |
||
$key | string | Key for the cache |
$config | Config to be cached |
public buildForHost ( string $host, boolean $addToCache = true ) : |
||
$host | string | Host, like en.wikipedia.org |
$addToCache | boolean | |
리턴 |
public buildFromUrl ( string $url, boolean $addToCache = true ) : |
||
$url | string | |
$addToCache | boolean | |
리턴 |
public getCachedVersion ( string $key ) : boolean | |
||
$key | string | Key for the cache |
리턴 | boolean | |
public loadSiteConfig ( string $host, boolean $exactHostMatch = false ) : false | |
||
$host | string | Host, like en.wikipedia.org |
$exactHostMatch | boolean | if true, we will not look for wildcard config matches |
리턴 | false | |
public mergeConfig ( |
||
$currentConfig | Current configuration | |
$newConfig | New configuration to be merged | |
리턴 | Merged config |
public parseLines ( array $lines ) : |
||
$lines | array | |
리턴 |
public setLogger ( Psr\Log\LoggerInterface $logger ) | ||
$logger | Psr\Log\LoggerInterface |