Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F6083749
GetConfigTrait.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
722 B
Referenced Files
None
Subscribers
None
GetConfigTrait.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
MediaWiki\Skins\Citizen
;
use
MediaWiki\Config\ConfigException
;
use
MediaWiki\Output\OutputPage
;
trait
GetConfigTrait
{
/**
* getConfig() wrapper to catch exceptions.
* Returns null on exception
*
* @param string $key
* @param OutputPage|null $out
* @return mixed
* @see SkinTemplate::getConfig()
*/
protected
function
getConfigValue
(
string
$key
,
?
OutputPage
$out
=
null
):
mixed
{
if
(
isset
(
$this
->
out
)
)
{
$out
=
$this
->
out
;
}
if
(
is_callable
(
[
$this
,
'getOutput'
]
)
)
{
$out
=
$this
->
getOutput
();
}
try
{
$value
=
$out
->
getConfig
()->
get
(
$key
);
}
catch
(
ConfigException
$e
)
{
$value
=
null
;
}
return
$value
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Oct 5 2026, 12:45 (6 w, 1 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
22/4d/7ac0710a246ed2afacabbfa9cbc6
Default Alt Text
GetConfigTrait.php (722 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment