Gitamin\Http\Controllers\Projects\TreeController::getFiles PHP Méthode

getFiles() protected méthode

protected getFiles ( $repository, $tree, $branch, $path )
    protected function getFiles($repository, $tree, $branch, $path)
    {
        //Cache
        if (!$path) {
            $key = md5($repository->getPath() . $tree . $branch);
            return Cache::remember('files_' . $key, 10, function () use($repository, $tree, $branch, $path) {
                $files = $repository->getTree($tree ? "{$branch}:\"{$tree}\"/" : $branch);
                return $files->output($path);
            });
        }
        $files = $repository->getTree($tree ? "{$branch}:\"{$tree}\"/" : $branch);
        return $files->output($path);
    }