src/frogsystem/metamorphosis/Services/FileConfig.php
protected function getFileIterator($path, $pattern = '/^.+\.php$/')
    {
        if (is_dir($path)) {
            return new \RegexIterator(new \DirectoryIterator($path), $pattern, \RegexIterator::GET_MATCH);
        }
        if (is_file($path) && 1 === preg_match($pattern, $path)) {
            return [new \SplFileInfo($path)];
        }
        return [];
    }
protected function getFileIterator($path, $pattern = '/^.+\.php$/')
    {
        if (is_dir($path)) {
            return new \RegexIterator(new \DirectoryIterator($path), $pattern, \RegexIterator::GET_MATCH);
        }
        if (is_file($path) && 1 === preg_match($pattern, $path)) {
            return [new \SplFileInfo($path)];
        }
        return [];
    }
protected function getFileIterator ( $ path , $ pattern = '/^.+\.php$/' ) { if ( is_dir ( $ path ) ) { return new \ RegexIterator ( new \ DirectoryIterator ( $ path ) , $ pattern , \ RegexIterator :: GET_MATCH ) ; } if ( is_file ( $ path ) && 1 === preg_match ( $ pattern , $ path ) ) { return [ new \ SplFileInfo ( $ path ) ] ; } return [ ] ; }
Get the iterator for specified config files.
@param $path
@param string $pattern
@return array|\RegexIterator
Get the iterator for specified config files .