本文整理汇总了PHP中GitRepository::getRemoteServerId方法的典型用法代码示例。如果您正苦于以下问题:PHP GitRepository::getRemoteServerId方法的具体用法?PHP GitRepository::getRemoteServerId怎么用?PHP GitRepository::getRemoteServerId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GitRepository
的用法示例。
在下文中一共展示了GitRepository::getRemoteServerId方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getRemoteRepositoryInfoDone
private function getRemoteRepositoryInfoDone()
{
/** @var $gerrit_server Git_RemoteServer_GerritServer */
$gerrit_server = $this->gerrit_servers[$this->repository->getRemoteServerId()];
$driver = $this->driver_factory->getDriver($gerrit_server);
$gerrit_project = $driver->getGerritProjectName($this->repository);
$link = $gerrit_server->getProjectUrl($gerrit_project);
$html = '';
$html .= '<div class="alert alert-info gerrit_url">';
$html .= $GLOBALS['Language']->getText('plugin_git', 'delegated_to_gerrit');
$html .= ' <a href="' . $link . '">' . $gerrit_project . '</a>';
$html .= '</div>';
return $html;
}
示例2: getAccessURLs
private function getAccessURLs()
{
$urls = $this->repository->getAccessURL();
if ($this->repository->isMigratedToGerrit()) {
$gerrit_user = $this->gerrit_usermanager->getGerritUser($this->current_user);
$gerrit_server = $this->gerrit_servers[$this->repository->getRemoteServerId()];
$driver = $this->driver_factory->getDriver($gerrit_server);
$gerrit_project = $driver->getGerritProjectName($this->repository);
$clone_url = $gerrit_server->getEndUserCloneUrl($gerrit_project, $gerrit_user);
$this->prependGerritCloneURL($urls, $clone_url);
}
return $urls;
}
示例3: queueRemoteProjectReadOnly
public function queueRemoteProjectReadOnly(GitRepository $repository)
{
$this->system_event_manager->createEvent(SystemEvent_GIT_GERRIT_PROJECT_READONLY::NAME, $repository->getId() . SystemEvent::PARAMETER_SEPARATOR . $repository->getRemoteServerId(), SystemEvent::PRIORITY_HIGH, SystemEvent::OWNER_APP);
}
示例4: getServer
/**
*
* @param GitRepository $repository
* @return Git_RemoteServer_GerritServer
*/
public function getServer(GitRepository $repository)
{
$id = $repository->getRemoteServerId();
return $this->getServerById($id);
}
示例5: getGerritServerForRepository
private function getGerritServerForRepository(GitRepository $repository)
{
return $this->gerrit_servers[$repository->getRemoteServerId()];
}