public getRepo ( |
||
$bundle | ||
Результат |
public function getRepo(BundleEntity $bundle)
{
if ($this->hasRepo($bundle)) {
$dir = $this->getRepoDir($bundle);
$repo = new PHPGit_Repository($dir, false, array('git_executable' => $this->gitExecutable));
} else {
$repo = $this->createGitRepo($bundle);
}
return new Repo($bundle, $repo);
}
protected function getRepo($repoFullName = 'KnpLabs/KnpGaufretteBundle') { $dir = sys_get_temp_dir() . '/kb_git_repos'; $manager = new RepoManager($dir, $_SERVER['GIT_BIN']); $repo = new Bundle($repoFullName); $gitRepo = $manager->getRepo($repo); return $gitRepo; }