MediaWiki
REL1_34
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
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
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
Definition
CacheDependency.php:27
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:117
includes
cache
dependency
MainConfigDependency.php
Generated on Fri Apr 5 2024 23:09:43 for MediaWiki by
1.9.8