MediaWiki
REL1_35
MainConfigDependency.php
Go to the documentation of this file.
1
<?php
23
use
MediaWiki\MediaWikiServices
;
24
28
class
MainConfigDependency
extends
CacheDependency
{
29
private
$name
;
30
private
$value
;
31
32
public
function
__construct
(
$name
) {
33
$this->name =
$name
;
34
$this->value = $this->
getConfig
()->get( $this->name );
35
}
36
37
private
function
getConfig
() {
38
return
MediaWikiServices::getInstance()->getMainConfig();
39
}
40
44
public
function
isExpired
() {
45
if
( !$this->
getConfig
()->has( $this->name ) ) {
46
return
true
;
47
}
48
49
return
$this->
getConfig
()->get( $this->name ) !=
$this->value
;
50
}
51
}
CacheDependency
Stable to extend.
Definition
CacheDependency.php:28
MainConfigDependency
Definition
MainConfigDependency.php:28
MainConfigDependency\isExpired
isExpired()
Definition
MainConfigDependency.php:44
MainConfigDependency\$name
$name
Definition
MainConfigDependency.php:29
MainConfigDependency\__construct
__construct( $name)
Definition
MainConfigDependency.php:32
MainConfigDependency\$value
$value
Definition
MainConfigDependency.php:30
MainConfigDependency\getConfig
getConfig()
Definition
MainConfigDependency.php:37
MediaWiki\MediaWikiServices
MediaWikiServices is the service locator for the application scope of MediaWiki.
Definition
MediaWikiServices.php:152
includes
cache
dependency
MainConfigDependency.php
Generated on Sat Apr 6 2024 00:06:58 for MediaWiki by
1.9.8