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