MediaWiki
REL1_41
MainConfigDependency.php
Go to the documentation of this file.
1
<?php
20
use
MediaWiki\MediaWikiServices
;
21
27
class
MainConfigDependency
extends
CacheDependency
{
28
private
$name;
29
private
$value;
30
31
public
function
__construct
( $name ) {
32
$this->name = $name;
33
$this->value = $this->getConfig()->get( $this->name );
34
}
35
36
private
function
getConfig() {
37
return
MediaWikiServices::getInstance()->getMainConfig();
38
}
39
40
public
function
isExpired
() {
41
if
( !$this->getConfig()->has( $this->name ) ) {
42
return
true
;
43
}
44
45
return
$this->getConfig()->get( $this->name ) != $this->value;
46
}
47
}
CacheDependency
Base class to represent dependencies for LocalisationCache entries.
Definition
CacheDependency.php:27
MainConfigDependency
Depend on a MediaWiki configuration variable.
Definition
MainConfigDependency.php:27
MainConfigDependency\isExpired
isExpired()
Returns true if the dependency is expired, false otherwise.
Definition
MainConfigDependency.php:40
MainConfigDependency\__construct
__construct( $name)
Definition
MainConfigDependency.php:31
MediaWiki\MediaWikiServices
Service locator for MediaWiki core services.
Definition
MediaWikiServices.php:232
includes
language
dependency
MainConfigDependency.php
Generated on Wed Nov 27 2024 07:23:39 for MediaWiki by
1.10.0