protected function scanOverrideFiles($directory, array &$results = array())
    {
        foreach (new DirectoryIterator($directory) as $file) {
            if ($file->isFile() && $file->getExtension() === 'php') {
                $results[] = $file->getFilename();
            } elseif ($file->isDir() && !$file->isDot()) {
                $this->scanOverrideFiles($file->getRealPath(), $results);
            }
        }

        return $results;
    }
protected function scanOverrideFiles($directory, array &$results = array())
    {
        foreach (new DirectoryIterator($directory) as $file) {
            if ($file->isFile() && $file->getExtension() === 'php') {
                $results[] = $file->getFilename();
            } elseif ($file->isDir() && !$file->isDot()) {
                $this->scanOverrideFiles($file->getRealPath(), $results);
            }
        }

        return $results;
    }
protected function scanOverrideFiles ( $ directory , array & $ results = array ( ) ) { foreach ( new DirectoryIterator ( $ directory ) as $ file ) { if ( $ file -> isFile ( ) && $ file -> getExtension ( ) === 'php' ) { $ results [ ] = $ file -> getFilename ( ) ; } elseif ( $ file -> isDir ( ) && ! $ file -> isDot ( ) ) { $ this -> scanOverrideFiles ( $ file -> getRealPath ( ) , $ results ) ; } } return $ results ; }
Recursively scans module override files
@param string $directory
@param array $results
@return array
Recursively scans module override files