src/FileSystemExtract.php
public function extract()
    {
        $iterator = new \RecursiveDirectoryIterator($this->path);
        $iterator = new \RecursiveIteratorIterator($iterator);

        $pages = [];
        $files = iterator_to_array($iterator);
        $files = array_filter($files, function($file)
        {
            return $file->isFile();
        });
        
        foreach($files as $path)
        {
            $pages[$this->exclude($path)] = compact('path');
        }
        
        return $pages;
    }
public function extract()
    {
        $iterator = new \RecursiveDirectoryIterator($this->path);
        $iterator = new \RecursiveIteratorIterator($iterator);

        $pages = [];
        $files = iterator_to_array($iterator);
        $files = array_filter($files, function($file)
        {
            return $file->isFile();
        });
        
        foreach($files as $path)
        {
            $pages[$this->exclude($path)] = compact('path');
        }
        
        return $pages;
    }
public function extract ( ) { $ iterator = new \ RecursiveDirectoryIterator ( $ this -> path ) ; $ iterator = new \ RecursiveIteratorIterator ( $ iterator ) ; $ pages = [ ] ; $ files = iterator_to_array ( $ iterator ) ; $ files = array_filter ( $ files , function ( $ file ) { return $ file -> isFile ( ) ; } ) ; foreach ( $ files as $ path ) { $ pages [ $ this -> exclude ( $ path ) ] = compact ( 'path' ) ; } return $ pages ; }
Extract web pages from file system from given path
Extract web pages from file system from given path