Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1432646
MultiConfig.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
MultiConfig.php
View Options
<?php
/**
* Copyright 2014
*
* @license GPL-2.0-or-later
* @file
*/
namespace
MediaWiki\Config
;
/**
* Provides a fallback sequence for Config objects
*
* @since 1.24
*/
class
MultiConfig
implements
Config
{
/**
* Array of Config objects to use
* Order matters, the Config objects
* will be checked in order to see
* whether they have the requested setting
*
* @var Config[]
*/
private
$configs
;
/**
* @param Config[] $configs
*/
public
function
__construct
(
array
$configs
)
{
$this
->
configs
=
$configs
;
}
/**
* @inheritDoc
*/
public
function
get
(
$name
)
{
foreach
(
$this
->
configs
as
$config
)
{
if
(
$config
->
has
(
$name
)
)
{
return
$config
->
get
(
$name
);
}
}
throw
new
ConfigException
(
__METHOD__
.
": undefined option: '$name'"
);
}
/**
* @inheritDoc
*/
public
function
has
(
$name
)
{
foreach
(
$this
->
configs
as
$config
)
{
if
(
$config
->
has
(
$name
)
)
{
return
true
;
}
}
return
false
;
}
}
/** @deprecated class alias since 1.41 */
class_alias
(
MultiConfig
::
class
,
'MultiConfig'
);
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, May 16, 22:07 (1 d, 5 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
ca/2d/d855589e48d4378c09adcc5f7493
Default Alt Text
MultiConfig.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment