src/JaztecAdmin/Direct/Framework.php
protected function rglob($pattern = '*', $flags = 0, $path = '')
    {
        $paths = glob($path . '*', GLOB_MARK | GLOB_ONLYDIR | GLOB_NOSORT);
        $files = glob($path . $pattern, $flags);
        foreach ($paths as $path) {
            $files = array_merge(
                $files,
                $this->rglob($pattern, $flags, $path)
            );
        }

        return $files;
    }
protected function rglob($pattern = '*', $flags = 0, $path = '')
    {
        $paths = glob($path . '*', GLOB_MARK | GLOB_ONLYDIR | GLOB_NOSORT);
        $files = glob($path . $pattern, $flags);
        foreach ($paths as $path) {
            $files = array_merge(
                $files,
                $this->rglob($pattern, $flags, $path)
            );
        }

        return $files;
    }
protected function rglob ( $ pattern = '*' , $ flags = 0 , $ path = '' ) { $ paths = glob ( $ path . '*' , GLOB_MARK | GLOB_ONLYDIR | GLOB_NOSORT ) ; $ files = glob ( $ path . $ pattern , $ flags ) ; foreach ( $ paths as $ path ) { $ files = array_merge ( $ files , $ this -> rglob ( $ pattern , $ flags , $ path ) ) ; } return $ files ; }
Recursive glob function.

@param  int    $pattern the pattern passed to glob()
@param  int    $flags   the flags passed to glob()
@param  string $path    the path to scan
@return mixed  an array of files in the given path matching the pattern.
Recursive glob function .