Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4075452
MainConfigDependency.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
774 B
Referenced Files
None
Subscribers
None
MainConfigDependency.php
View Options
<?php
/**
* @license GPL-2.0-or-later
* @file
*/
use
MediaWiki\Config\Config
;
use
MediaWiki\MediaWikiServices
;
/**
* Depend on a MediaWiki configuration variable from the global config.
*
* @ingroup Language
*/
class
MainConfigDependency
extends
CacheDependency
{
/** @var string */
private
$name
;
/** @var mixed */
private
$value
;
public
function
__construct
(
string
$name
)
{
$this
->
name
=
$name
;
$this
->
value
=
$this
->
getConfig
()->
get
(
$this
->
name
);
}
private
function
getConfig
():
Config
{
return
MediaWikiServices
::
getInstance
()->
getMainConfig
();
}
/** @inheritDoc */
public
function
isExpired
()
{
if
(
!
$this
->
getConfig
()->
has
(
$this
->
name
)
)
{
return
true
;
}
return
$this
->
getConfig
()->
get
(
$this
->
name
)
!=
$this
->
value
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Aug 17 2026, 18:35 (10 w, 1 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
3b/e5/a106ec603b79b221a2ff3dfffa9b
Default Alt Text
MainConfigDependency.php (774 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment