本文整理汇总了PHP中ProjectManager::getProjectByUnixName方法的典型用法代码示例。如果您正苦于以下问题:PHP ProjectManager::getProjectByUnixName方法的具体用法?PHP ProjectManager::getProjectByUnixName怎么用?PHP ProjectManager::getProjectByUnixName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProjectManager
的用法示例。
在下文中一共展示了ProjectManager::getProjectByUnixName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getProjectFromRepositoryPath
/**
* Returns the Project that match the given string
*
* @param String $repository_path
* @return Project
* @throws Exception
*/
public function getProjectFromRepositoryPath($repository_path)
{
$unix_group_name = substr($repository_path, strlen(ForgeConfig::get('svn_prefix')) + 1);
$project = $this->project_manager->getProjectByUnixName($unix_group_name);
if ($project && !$project->isError() && !$project->isDeleted()) {
return $project;
}
throw new Exception('Invalid project');
}
示例2: renameProject
public function renameProject($old_name, $new_name)
{
$git_modifications = new Git_Gitolite_GitModifications();
$project = $this->project_manager->getProjectByUnixName($new_name);
$this->moveProjectFiles($old_name, $new_name, $git_modifications, $project);
$this->modifyProjectConf($old_name, $new_name, $git_modifications, $project);
$this->modifyIncludersConf($old_name, $new_name, $git_modifications, $project);
return $git_modifications;
}
示例3: getByProjectNameAndPath
/**
*
* @param String $projectName
* @param String $path
*
* @return GitRepository
*/
public function getByProjectNameAndPath($projectName, $path)
{
$project = $this->projectManager->getProjectByUnixName($projectName);
if ($project) {
return $this->getRepositoryByPath($project->getID(), $projectName . '/' . $path);
}
return null;
}