MediaWiki REL1_41
MainConfigDependency.php
Go to the documentation of this file.
1<?php
21
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}
Base class to represent dependencies for LocalisationCache entries.
Depend on a MediaWiki configuration variable.
isExpired()
Returns true if the dependency is expired, false otherwise.
Service locator for MediaWiki core services.