Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7476538
ConfigWrapper.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
848 B
Referenced Files
None
Subscribers
None
ConfigWrapper.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
MediaWiki\Babel\Config
;
use
MediaWiki\Config\Config
;
use
MediaWiki\Extension\CommunityConfiguration\Access\MediaWikiConfigRouter
;
class
ConfigWrapper
implements
Config
{
private
MediaWikiConfigRouter
$configRouter
;
public
function
__construct
(
MediaWikiConfigRouter
$configRouter
)
{
$this
->
configRouter
=
$configRouter
;
}
/**
* @inheritDoc
*/
public
function
get
(
$name
)
{
$value
=
$this
->
configRouter
->
get
(
$name
);
if
(
is_object
(
$value
)
)
{
// CommunityConfiguration passes objects instead of associative arrays (which Babel
// expects). This affects eg. BabelCategoryNames. See T369608.
$value
=
wfObjectToArray
(
$value
);
}
return
$value
;
}
/**
* @inheritDoc
*/
public
function
has
(
$name
):
bool
{
return
$this
->
configRouter
->
has
(
$name
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Nov 23, 10:24 (4 d, 13 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
e5/9b/e365db8bfa2dcd35c2f403353c19
Default Alt Text
ConfigWrapper.php (848 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment