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