MediaWiki  master
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 
43  public function isExpired() {
44  if ( !$this->getConfig()->has( $this->name ) ) {
45  return true;
46  }
47 
48  return $this->getConfig()->get( $this->name ) != $this->value;
49  }
50 }
Base class to represent dependencies for LocalisationCache entries.
Depend on a MW configuration variable.
Service locator for MediaWiki core services.