diff options
Diffstat (limited to 'includes/Settings/Source/ArraySource.php')
-rw-r--r-- | includes/Settings/Source/ArraySource.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/includes/Settings/Source/ArraySource.php b/includes/Settings/Source/ArraySource.php new file mode 100644 index 000000000000..a7a1cdfbf66f --- /dev/null +++ b/includes/Settings/Source/ArraySource.php @@ -0,0 +1,25 @@ +<?php + +namespace MediaWiki\Settings\Source; + +/** + * Settings loaded from an array. + * + * @since 1.38 + */ +class ArraySource implements SettingsSource { + + private $settings; + + public function __construct( array $settings ) { + $this->settings = $settings; + } + + public function load(): array { + return $this->settings; + } + + public function __toString(): string { + return '<array>'; + } +} |