/**
* Things to be called once registration of these extensions are done
+ * keyed by the name of the extension that it belongs to
*
* @var callable[]
*/
$this->extractResourceLoaderModules( $dir, $info );
$this->extractServiceWiringFiles( $dir, $info );
$this->extractParserTestFiles( $dir, $info );
+ $name = $this->extractCredits( $path, $info );
if ( isset( $info['callback'] ) ) {
- $this->callbacks[] = $info['callback'];
+ $this->callbacks[$name] = $info['callback'];
}
- $this->extractCredits( $path, $info );
foreach ( $info as $key => $val ) {
if ( in_array( $key, self::$globalSettings ) ) {
$this->storeToArray( $path, "wg$key", $val, $this->globals );
/**
* @param string $path
* @param array $info
+ * @return string Name of thing
* @throws Exception
*/
protected function extractCredits( $path, array $info ) {
$this->credits[$name] = $credits;
$this->globals['wgExtensionCredits'][$credits['type']][] = $credits;
+
+ return $name;
}
/**
/**
* Bump whenever the registration cache needs resetting
*/
- const CACHE_VERSION = 3;
+ const CACHE_VERSION = 4;
/**
* Special key that defines the merge strategy
foreach ( $info['autoloaderPaths'] as $path ) {
require_once $path;
}
- foreach ( $info['callbacks'] as $cb ) {
- call_user_func( $cb );
- }
$this->loaded += $info['credits'];
if ( $info['attributes'] ) {
$this->attributes = array_merge_recursive( $this->attributes, $info['attributes'] );
}
}
+
+ foreach ( $info['callbacks'] as $name => $cb ) {
+ call_user_func( $cb, $info['credits'][$name] );
+ }
}
/**