aboutsummaryrefslogtreecommitdiffstats
path: root/includes/Settings/Cache
diff options
context:
space:
mode:
Diffstat (limited to 'includes/Settings/Cache')
-rw-r--r--includes/Settings/Cache/CachedSource.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/includes/Settings/Cache/CachedSource.php b/includes/Settings/Cache/CachedSource.php
index c840636440ad..7e1cf55f29d1 100644
--- a/includes/Settings/Cache/CachedSource.php
+++ b/includes/Settings/Cache/CachedSource.php
@@ -3,6 +3,7 @@
namespace MediaWiki\Settings\Cache;
use BagOStuff;
+use MediaWiki\Settings\Source\SettingsIncludeLocator;
use MediaWiki\Settings\Source\SettingsSource;
/**
@@ -11,7 +12,7 @@ use MediaWiki\Settings\Source\SettingsSource;
* @since 1.38
* @todo mark as stable before the 1.38 release
*/
-class CachedSource implements SettingsSource {
+class CachedSource implements SettingsSource, SettingsIncludeLocator {
/** @var BagOStuff */
private $cache;
@@ -115,4 +116,13 @@ class CachedSource implements SettingsSource {
'generation' => $finish - $start,
];
}
+
+ public function locateInclude( string $location ): string {
+ if ( $this->source instanceof SettingsIncludeLocator ) {
+ return $this->source->locateInclude( $location );
+ } else {
+ // Just return the location as-is
+ return $location;
+ }
+ }
}