Handler/ConfigurationFileHandler.php
public function loadConfigurationFile(Module $module)
    {
        $finder = (new Finder)
            // TODO: Flip when yaml parsing will be up
//            ->name('#customer[-_\.]?group\.(?:xml|yml|yaml)#i')
            ->name('#customer[-_\.]?group\.xml#i')
            ->in($module->getAbsoluteConfigPath());
        $count = $finder->count();

        if ($count > 1) {
            throw new InvalidConfigurationException('Too many configuration file.');
        } else {
            foreach ($finder as $file) {
                if (strtolower(pathinfo($file, PATHINFO_EXTENSION)) === 'xml') {
                    $moduleConfig = $this->parseXml($file);
                } else {
                    $moduleConfig = $this->parseYml($file);
                }

                $this->applyConfig($moduleConfig);
            }
        }
    }
public function loadConfigurationFile(Module $module)
    {
        $finder = (new Finder)
            // TODO: Flip when yaml parsing will be up
//            ->name('#customer[-_\.]?group\.(?:xml|yml|yaml)#i')
            ->name('#customer[-_\.]?group\.xml#i')
            ->in($module->getAbsoluteConfigPath());
        $count = $finder->count();

        if ($count > 1) {
            throw new InvalidConfigurationException('Too many configuration file.');
        } else {
            foreach ($finder as $file) {
                if (strtolower(pathinfo($file, PATHINFO_EXTENSION)) === 'xml') {
                    $moduleConfig = $this->parseXml($file);
                } else {
                    $moduleConfig = $this->parseYml($file);
                }

                $this->applyConfig($moduleConfig);
            }
        }
    }
public function loadConfigurationFile ( Module $ module ) { $ finder = ( new Finder ) // TODO: Flip when yaml parsing will be up //            ->name('#customer[-_\.]?group\.(?:xml|yml|yaml)#i') -> name ( '#customer[-_\.]?group\.xml#i' ) -> in ( $ module -> getAbsoluteConfigPath ( ) ) ; $ count = $ finder -> count ( ) ; if ( $ count > 1 ) { throw new InvalidConfigurationException ( 'Too many configuration file.' ) ; } else { foreach ( $ finder as $ file ) { if ( strtolower ( pathinfo ( $ file , PATHINFO_EXTENSION ) ) === 'xml' ) { $ moduleConfig = $ this -> parseXml ( $ file ) ; } else { $ moduleConfig = $ this -> parseYml ( $ file ) ; } $ this -> applyConfig ( $ moduleConfig ) ; } } }
Find, parse and load customer group configuration file for module

@param Module $module A module object

@throws InvalidConfigurationException
Find parse and load customer group configuration file for module