MediaWiki master
GlobalDependency.php
Go to the documentation of this file.
1<?php
15 private $name;
17 private $value;
18
19 public function __construct( string $name ) {
20 $this->name = $name;
21 $this->value = $GLOBALS[$name];
22 }
23
25 public function isExpired() {
26 if ( !isset( $GLOBALS[$this->name] ) ) {
27 return true;
28 }
29
30 return $GLOBALS[$this->name] != $this->value;
31 }
32}
Base class to represent dependencies for LocalisationCache entries.
Depend on a PHP global variable.
__construct(string $name)
isExpired()
Returns true if the dependency is expired, false otherwise.bool