aboutsummaryrefslogtreecommitdiffstats
path: root/includes/Settings/Source/SettingsSource.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/Settings/Source/SettingsSource.php')
-rw-r--r--includes/Settings/Source/SettingsSource.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/includes/Settings/Source/SettingsSource.php b/includes/Settings/Source/SettingsSource.php
new file mode 100644
index 000000000000..31df14fefde1
--- /dev/null
+++ b/includes/Settings/Source/SettingsSource.php
@@ -0,0 +1,25 @@
+<?php
+
+namespace MediaWiki\Settings\Source;
+
+use MediaWiki\Settings\SettingsBuilderException;
+use Stringable;
+
+/**
+ * A SettingsSource is meant to represent any kind of local or remote store
+ * from which settings can be read, be it a local file, remote URL, database,
+ * etc. It is concerned with reading (and possibly decoding) settings data.
+ *
+ * @since 1.38
+ * @todo mark as stable before the 1.38 release
+ */
+interface SettingsSource extends Stringable {
+ /**
+ * Loads and returns all settings from this source as an associative
+ * array.
+ *
+ * @return array
+ * @throws SettingsBuilderException
+ */
+ public function load(): array;
+}