本文整理汇总了PHP中Git::allPermissionTypes方法的典型用法代码示例。如果您正苦于以下问题:PHP Git::allPermissionTypes方法的具体用法?PHP Git::allPermissionTypes怎么用?PHP Git::allPermissionTypes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Git
的用法示例。
在下文中一共展示了Git::allPermissionTypes方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: clonePermissions
public function clonePermissions(GitRepository $old, GitRepository $new)
{
$pm = $this->getPermissionsManager();
if ($this->inSameProject($old, $new)) {
$pm->duplicateWithStatic($old->getId(), $new->getId(), Git::allPermissionTypes());
} else {
$pm->duplicateWithoutStatic($old->getId(), $new->getId(), Git::allPermissionTypes());
}
}
示例2: testClonePermsCrossProjectFork
public function testClonePermsCrossProjectFork()
{
$old_repo_id = 110;
$old_project = new MockProject();
$old_project->setReturnValue('getId', 1);
$new_repo_id = 220;
$new_project = new MockProject();
$new_project->setReturnValue('getId', 2);
$old = new MockGitRepository();
$old->setReturnValue('getId', $old_repo_id);
$old->setReturnValue('getProject', $old_project);
$new = new MockGitRepository();
$new->setReturnValue('getId', $new_repo_id);
$new->setReturnValue('getProject', $new_project);
$backend = $this->_GivenABackendGitolite();
$permissionsManager = $backend->getPermissionsManager();
$permissionsManager->expectOnce('duplicateWithoutStatic', array($old_repo_id, $new_repo_id, Git::allPermissionTypes()));
$backend->clonePermissions($old, $new);
}
示例3: updateRepositoriesPermissions
private function updateRepositoriesPermissions($old_ugroup_id, $new_ugroup_id)
{
$git_permission_type = $this->da->quoteSmartImplode(',', Git::allPermissionTypes());
$sql = "UPDATE permissions\n SET ugroup_id = {$new_ugroup_id}\n WHERE ugroup_id = {$old_ugroup_id}\n AND permission_type IN ({$git_permission_type})\n ";
return $this->update($sql);
}