MediaWiki master
GlobalDependency.php
Go to the documentation of this file.
1<?php
28 private $name;
29 private $value;
30
31 public function __construct( $name ) {
32 $this->name = $name;
33 $this->value = $GLOBALS[$name];
34 }
35
36 public function isExpired() {
37 if ( !isset( $GLOBALS[$this->name] ) ) {
38 return true;
39 }
40
41 return $GLOBALS[$this->name] != $this->value;
42 }
43}
Base class to represent dependencies for LocalisationCache entries.
Depend on a PHP global variable.
isExpired()
Returns true if the dependency is expired, false otherwise.