protected function getSchemas($directory, $recursive = false)
    {
        $finder = new Finder();
        $finder
            ->name('*schema.xml')
            ->sortByName()
            ->in($directory);
        if (!$recursive) {
            $finder->depth(0);
        }

        return iterator_to_array($finder->files());
    }
protected function getSchemas($directory, $recursive = false)
    {
        $finder = new Finder();
        $finder
            ->name('*schema.xml')
            ->sortByName()
            ->in($directory);
        if (!$recursive) {
            $finder->depth(0);
        }

        return iterator_to_array($finder->files());
    }
protected function getSchemas ( $ directory , $ recursive = false ) { $ finder = new Finder ( ) ; $ finder -> name ( '*schema.xml' ) -> sortByName ( ) -> in ( $ directory ) ; if ( ! $ recursive ) { $ finder -> depth ( 0 ) ; } return iterator_to_array ( $ finder -> files ( ) ) ; }
Find every schema files.

@param string|array $directory Path to the input directory
@param bool         $recursive Search for file inside the input directory and all subdirectories

@return array List of schema files
Find every schema files .