Method | Description | |
---|---|---|
__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 | |
return |
public buildFromUrl ( string $url, boolean $addToCache = true ) : |
||
$url | string | |
$addToCache | boolean | |
return |
public getCachedVersion ( string $key ) : boolean | |
||
$key | string | Key for the cache |
return | 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 |
return | false | |
public mergeConfig ( |
||
$currentConfig | Current configuration | |
$newConfig | New configuration to be merged | |
return | Merged config |
public parseLines ( array $lines ) : |
||
$lines | array | |
return |
public setLogger ( Psr\Log\LoggerInterface $logger ) | ||
$logger | Psr\Log\LoggerInterface |