protected function getFilesFromDirectory(string $mappingDirectory): array
    {
        $mappingPaths = [];

        $filePattern = \sprintf('/^.+\.(%s)$/i', \implode('|', $this->extensions));
        $recursiveIterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($mappingDirectory));
        $regexIterator = new \RegexIterator($recursiveIterator, $filePattern, \RecursiveRegexIterator::GET_MATCH);

        foreach ($regexIterator as $mappingFile) {
            $mappingPaths[] = $mappingFile[0];
        }

        \sort($mappingPaths);

        return $mappingPaths;
    }
protected function getFilesFromDirectory(string $mappingDirectory): array
    {
        $mappingPaths = [];

        $filePattern = \sprintf('/^.+\.(%s)$/i', \implode('|', $this->extensions));
        $recursiveIterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($mappingDirectory));
        $regexIterator = new \RegexIterator($recursiveIterator, $filePattern, \RecursiveRegexIterator::GET_MATCH);

        foreach ($regexIterator as $mappingFile) {
            $mappingPaths[] = $mappingFile[0];
        }

        \sort($mappingPaths);

        return $mappingPaths;
    }
protected function getFilesFromDirectory ( string $ mappingDirectory ) : array { $ mappingPaths = [ ] ; $ filePattern = \ sprintf ( '/^.+\.(%s)$/i' , \ implode ( '|' , $ this -> extensions ) ) ; $ recursiveIterator = new \ RecursiveIteratorIterator ( new \ RecursiveDirectoryIterator ( $ mappingDirectory ) ) ; $ regexIterator = new \ RegexIterator ( $ recursiveIterator , $ filePattern , \ RecursiveRegexIterator :: GET_MATCH ) ; foreach ( $ regexIterator as $ mappingFile ) { $ mappingPaths [ ] = $ mappingFile [ 0 ] ; } \ sort ( $ mappingPaths ) ; return $ mappingPaths ; }
Get mapping files from directory.

@param string $mappingDirectory

@return array
Get mapping files from directory .