public function findModules()
    {
        $dirs    = $this->getOption('module_dirs');
        $modules = array();
    
        foreach($dirs as $dir){
            $iterator = new DirectoryIterator($dir);
    
            foreach ($iterator as $file) {
                if (($file->isDir() && substr($file->getBasename(), 0, 1) !== '.') 
                    || ($file->isFile() && $file->getExtension() == 'phar')) {
                    
                    $modules[$file->getRealPath()] = strtolower($file->getBasename());
                }
            }
        }
    
        return $modules;
    }
public function findModules()
    {
        $dirs    = $this->getOption('module_dirs');
        $modules = array();
    
        foreach($dirs as $dir){
            $iterator = new DirectoryIterator($dir);
    
            foreach ($iterator as $file) {
                if (($file->isDir() && substr($file->getBasename(), 0, 1) !== '.') 
                    || ($file->isFile() && $file->getExtension() == 'phar')) {
                    
                    $modules[$file->getRealPath()] = strtolower($file->getBasename());
                }
            }
        }
    
        return $modules;
    }
public function findModules ( ) { $ dirs = $ this -> getOption ( 'module_dirs' ) ; $ modules = array ( ) ; foreach ( $ dirs as $ dir ) { $ iterator = new DirectoryIterator ( $ dir ) ; foreach ( $ iterator as $ file ) { if ( ( $ file -> isDir ( ) && substr ( $ file -> getBasename ( ) , 0 , 1 ) !== '.' ) || ( $ file -> isFile ( ) && $ file -> getExtension ( ) == 'phar' ) ) { $ modules [ $ file -> getRealPath ( ) ] = strtolower ( $ file -> getBasename ( ) ) ; } } } return $ modules ; }
Find all modules installed in module directories

@return array
Find all modules installed in module directories