MediaWiki
REL1_39
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
43
public
function
isExpired
() {
44
if
( !$this->getConfig()->has( $this->name ) ) {
45
return
true
;
46
}
47
48
return
$this->getConfig()->get( $this->name ) != $this->value;
49
}
50
}
CacheDependency
Base class to represent dependencies for LocalisationCache entries.
Definition
CacheDependency.php:27
MainConfigDependency
Depend on a MW configuration variable.
Definition
MainConfigDependency.php:27
MainConfigDependency\isExpired
isExpired()
Definition
MainConfigDependency.php:43
MainConfigDependency\__construct
__construct( $name)
Definition
MainConfigDependency.php:31
MediaWiki\MediaWikiServices
Service locator for MediaWiki core services.
Definition
MediaWikiServices.php:212
includes
language
dependency
MainConfigDependency.php
Generated on Mon Dec 16 2024 06:35:21 for MediaWiki by
1.10.0