Page MenuHomeWickedGov Phorge

ConstantDependency.php
No OneTemporary

Size
461 B
Referenced Files
None
Subscribers
None

ConstantDependency.php

<?php
/**
* @license GPL-2.0-or-later
* @file
*/
/**
* Depend on a PHP constant.
*
* @ingroup Language
*/
class ConstantDependency extends CacheDependency {
/** @var string */
private $name;
/** @var mixed */
private $value;
public function __construct( string $name ) {
$this->name = $name;
$this->value = constant( $name );
}
/**
* @return bool
*/
public function isExpired() {
return constant( $this->name ) != $this->value;
}
}

File Metadata

Mime Type
text/x-php
Expires
Aug 14 2026, 21:56 (12 w, 6 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
c4/2b/3ac10228cae758b376157909ac4e
Default Alt Text
ConstantDependency.php (461 B)

Event Timeline