53 public function getData( IReadableDatabase $db ): array {
54 $autoload = $groups = $value = [];
55 $parser = $this->messageGroupConfigurationParser;
56 foreach ( $this->groupFiles as $configFile ) {
57 $yaml = file_get_contents( $configFile );
58 $parsedData = $parser->getHopefullyValidConfigurations(
60 static function ( $index, $config, $error ) use ( $configFile ) {
61 trigger_error(
"Document $index in $configFile is invalid: $error", E_USER_WARNING );
65 foreach ( $parsedData as $id => $conf ) {
66 if ( !empty( $conf[
'AUTOLOAD'] ) && is_array( $conf[
'AUTOLOAD'] ) ) {
67 $dir = dirname( $configFile );
68 $additions = array_map(
static function ( $file ) use ( $dir ) {
70 }, $conf[
'AUTOLOAD'] );
71 self::appendAutoloader( $additions, $autoload );
77 $value[
'groups'] = $groups;
78 $value[
'autoload'] = $autoload;