MediaWiki master
MainConfigDependency.php
Go to the documentation of this file.
1<?php
21
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
41 public function isExpired() {
42 if ( !$this->getConfig()->has( $this->name ) ) {
43 return true;
44 }
45
46 return $this->getConfig()->get( $this->name ) != $this->value;
47 }
48}
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.