private function scanModuleFiles($basedir, &$folders)
    {
        if (is_dir($basedir) && ($h = opendir($basedir))) {
            while (($filename = readdir($h))) {
                $phpfile = $basedir . DIRECTORY_SEPARATOR . $filename;
                if (preg_match('/^init[_|-](.+)\.php$/', $filename) && file_exists($phpfile) && filesize($phpfile) > 0) {
                    $folders[] = $phpfile;
                }
            }
            closedir($h);
        }
    }
private function scanModuleFiles($basedir, &$folders)
    {
        if (is_dir($basedir) && ($h = opendir($basedir))) {
            while (($filename = readdir($h))) {
                $phpfile = $basedir . DIRECTORY_SEPARATOR . $filename;
                if (preg_match('/^init[_|-](.+)\.php$/', $filename) && file_exists($phpfile) && filesize($phpfile) > 0) {
                    $folders[] = $phpfile;
                }
            }
            closedir($h);
        }
    }
private function scanModuleFiles ( $ basedir , & $ folders ) { if ( is_dir ( $ basedir ) && ( $ h = opendir ( $ basedir ) ) ) { while ( ( $ filename = readdir ( $ h ) ) ) { $ phpfile = $ basedir . DIRECTORY_SEPARATOR . $ filename ; if ( preg_match ( '/^init[_|-](.+)\.php$/' , $ filename ) && file_exists ( $ phpfile ) && filesize ( $ phpfile ) > 0 ) { $ folders [ ] = $ phpfile ; } } closedir ( $ h ) ; } }
Scan module root files to locate the init file.
@param string $basedir Base directory to looking for module files.
@param array &$folders Array passed by reference to be filled with modules found.
Scan module root files to locate the init file .