MediaWiki master
MainConfigDependency.php
Go to the documentation of this file.
1<?php
21
29 private $name;
31 private $value;
32
33 public function __construct( $name ) {
34 $this->name = $name;
35 $this->value = $this->getConfig()->get( $this->name );
36 }
37
38 private function getConfig() {
39 return MediaWikiServices::getInstance()->getMainConfig();
40 }
41
42 public function isExpired() {
43 if ( !$this->getConfig()->has( $this->name ) ) {
44 return true;
45 }
46
47 return $this->getConfig()->get( $this->name ) != $this->value;
48 }
49}
Base class to represent dependencies for LocalisationCache entries.
Depend on a MediaWiki configuration variable from the global config.
isExpired()
Returns true if the dependency is expired, false otherwise.
Service locator for MediaWiki core services.