MediaWiki
1.32.5
|
Interface for configuration instances. More...
Public Member Functions | |
__construct (array $params) | |
fetchAllFromEtcd () | |
get ( $name) | |
Get a configuration variable such as "Sitename" or "UploadMaintenance.". More... | |
getModifiedIndex () | |
has ( $name) | |
Check whether a configuration option is set for the given name. More... | |
setLogger (LoggerInterface $logger) | |
Protected Member Functions | |
fetchAllFromEtcdServer ( $address) | |
parseDirectory ( $dirName, $dirNode, &$config) | |
Recursively parse a directory node and populate the array passed by reference, throwing EtcdConfigParseError if there is a validation error. More... | |
parseResponse ( $rbody) | |
Parse a response body, throwing EtcdConfigParseError if there is a validation error. More... | |
Private Member Functions | |
load () | |
unserialize ( $string) | |
Private Attributes | |
int | $baseCacheTTL |
string | $directory |
string | $encoding |
string | $host |
MultiHttpClient | $http |
LoggerInterface | $logger |
array | $procCache |
string | $protocol |
int | $skewCacheTTL |
BagOStuff | $srvCache |
int | $timeout |
EtcdConfig::__construct | ( | array | $params | ) |
array | $params | Parameter map:
|
Definition at line 68 of file EtcdConfig.php.
EtcdConfig::fetchAllFromEtcd | ( | ) |
Definition at line 209 of file EtcdConfig.php.
References $host, $response, IP\combineHostAndPort(), and fetchAllFromEtcdServer().
Referenced by load().
|
protected |
string | $address | Host and port |
Definition at line 238 of file EtcdConfig.php.
References $e, $response, http, list, parseResponse(), and true.
Referenced by fetchAllFromEtcd().
EtcdConfig::get | ( | $name | ) |
Get a configuration variable such as "Sitename" or "UploadMaintenance.".
string | $name | Name of configuration option |
ConfigException |
Implements Config.
Definition at line 112 of file EtcdConfig.php.
EtcdConfig::getModifiedIndex | ( | ) |
Definition at line 122 of file EtcdConfig.php.
References load().
EtcdConfig::has | ( | $name | ) |
Check whether a configuration option is set for the given name.
string | $name | Name of configuration option |
Implements Config.
Definition at line 106 of file EtcdConfig.php.
|
private |
ConfigException |
Definition at line 130 of file EtcdConfig.php.
References $baseCacheTTL, $skewCacheTTL, $timeout, directory, fetchAllFromEtcd(), IExpiringStore\TTL_INDEFINITE, and use.
Referenced by get(), getModifiedIndex(), and has().
|
protected |
Recursively parse a directory node and populate the array passed by reference, throwing EtcdConfigParseError if there is a validation error.
string | $dirName | The relative directory name |
array | $dirNode | The decoded directory node |
array | &$config | The output array |
Definition at line 292 of file EtcdConfig.php.
References $value, as, and unserialize().
Referenced by parseResponse().
|
protected |
Parse a response body, throwing EtcdConfigParseError if there is a validation error.
string | $rbody |
Definition at line 269 of file EtcdConfig.php.
References parseDirectory().
Referenced by fetchAllFromEtcdServer().
EtcdConfig::setLogger | ( | LoggerInterface | $logger | ) |
Definition at line 101 of file EtcdConfig.php.
|
private |
string | $string |
Definition at line 326 of file EtcdConfig.php.
Referenced by parseDirectory().
|
private |
Definition at line 50 of file EtcdConfig.php.
Referenced by load().
|
private |
Definition at line 46 of file EtcdConfig.php.
|
private |
Definition at line 48 of file EtcdConfig.php.
|
private |
Definition at line 42 of file EtcdConfig.php.
Referenced by fetchAllFromEtcd().
|
private |
Definition at line 33 of file EtcdConfig.php.
|
private |
Definition at line 39 of file EtcdConfig.php.
Referenced by setLogger().
|
private |
Definition at line 37 of file EtcdConfig.php.
|
private |
Definition at line 44 of file EtcdConfig.php.
|
private |
Definition at line 52 of file EtcdConfig.php.
Referenced by load().
|
private |
Definition at line 35 of file EtcdConfig.php.
|
private |
Definition at line 54 of file EtcdConfig.php.
Referenced by load().