Interface for configuration instances.
More...
Interface for configuration instances.
- Since
- 1.29
Definition at line 31 of file EtcdConfig.php.
◆ __construct()
EtcdConfig::__construct |
( |
array | $params | ) |
|
- Parameters
-
array | $params | Parameter map:
- host: the host address and port
- protocol: either http or https
- directory: the etc "directory" were MediaWiki specific variables are located
- encoding: one of ("JSON", "YAML"). Defaults to JSON. [optional]
- cache: BagOStuff instance or ObjectFactory spec thereof for a server cache. The cache will also be used as a fallback if etcd is down. [optional]
- cacheTTL: logical cache TTL in seconds [optional]
- skewTTL: maximum seconds to randomly lower the assigned TTL on cache save [optional]
- timeout: seconds to wait for etcd before throwing an error [optional]
|
Definition at line 68 of file EtcdConfig.php.
References $params, directory, and http.
◆ fetchAllFromEtcd()
EtcdConfig::fetchAllFromEtcd |
( |
| ) |
|
- Returns
- array (containing the keys config, error, retry, modifiedIndex)
Definition at line 209 of file EtcdConfig.php.
References $response.
◆ fetchAllFromEtcdServer()
EtcdConfig::fetchAllFromEtcdServer |
( |
| $address | ) |
|
|
protected |
- Parameters
-
string | $address | Host and port |
- Returns
- array (containing the keys config, error, retry, modifiedIndex)
Definition at line 238 of file EtcdConfig.php.
References $e, $response, http, list, and true.
◆ get()
Get a configuration variable such as "Sitename" or "UploadMaintenance.".
- Parameters
-
string | $name | Name of configuration option |
- Returns
- mixed Value configured
- Exceptions
-
Implements Config.
Definition at line 112 of file EtcdConfig.php.
References $name, and load().
◆ getModifiedIndex()
EtcdConfig::getModifiedIndex |
( |
| ) |
|
◆ has()
Check whether a configuration option is set for the given name.
- Parameters
-
string | $name | Name of configuration option |
- Returns
- bool
- Since
- 1.24
Implements Config.
Definition at line 106 of file EtcdConfig.php.
References load().
◆ load()
◆ parseDirectory()
EtcdConfig::parseDirectory |
( |
| $dirName, |
|
|
| $dirNode, |
|
|
& | $config ) |
|
protected |
Recursively parse a directory node and populate the array passed by reference, throwing EtcdConfigParseError if there is a validation error.
- Parameters
-
string | $dirName | The relative directory name |
array | $dirNode | The decoded directory node |
array | &$config | The output array |
- Returns
- int lastModifiedIndex The maximum last modified index across all keys in the directory
Definition at line 292 of file EtcdConfig.php.
References $fullName, $value, and unserialize().
◆ parseResponse()
EtcdConfig::parseResponse |
( |
| $rbody | ) |
|
|
protected |
◆ setLogger()
EtcdConfig::setLogger |
( |
LoggerInterface | $logger | ) |
|
◆ unserialize()
EtcdConfig::unserialize |
( |
| $string | ) |
|
|
private |
◆ $baseCacheTTL
int EtcdConfig::$baseCacheTTL |
|
private |
◆ $directory
string EtcdConfig::$directory |
|
private |
◆ $encoding
string EtcdConfig::$encoding |
|
private |
◆ $host
◆ $http
◆ $logger
LoggerInterface EtcdConfig::$logger |
|
private |
◆ $procCache
array EtcdConfig::$procCache |
|
private |
◆ $protocol
string EtcdConfig::$protocol |
|
private |
◆ $skewCacheTTL
int EtcdConfig::$skewCacheTTL |
|
private |
◆ $srvCache
◆ $timeout
The documentation for this class was generated from the following file: