MediaWiki REL1_34
MainConfigDependency.php
Go to the documentation of this file.
1<?php
24
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}
MediaWikiServices is the service locator for the application scope of MediaWiki.