当前位置: 首页>>代码示例>>PHP>>正文


PHP GitRepository::getId方法代码示例

本文整理汇总了PHP中GitRepository::getId方法的典型用法代码示例。如果您正苦于以下问题:PHP GitRepository::getId方法的具体用法?PHP GitRepository::getId怎么用?PHP GitRepository::getId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GitRepository的用法示例。


在下文中一共展示了GitRepository::getId方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getEvent

 private function getEvent(GitRepository $repository)
 {
     if (!isset($this->cache[$repository->getId()])) {
         $this->cache[$repository->getId()] = $this->dao->getSystemEventForRepository($repository->getId());
     }
     return $this->cache[$repository->getId()];
 }
开发者ID:blestab,项目名称:tuleap,代码行数:7,代码来源:ProjectCreatorStatus.php

示例2: getView

 private function getView()
 {
     if (empty($_REQUEST['a'])) {
         $_REQUEST['a'] = 'summary';
     } else {
         if ($_REQUEST['a'] === 'blobdiff' && isset($_REQUEST['jenkins']) && $_REQUEST['jenkins'] === 'true') {
             $this->inverseURLArgumentsForGitPhpDiff();
         }
     }
     set_time_limit(300);
     $_GET['a'] = $_REQUEST['a'];
     $_REQUEST['group_id'] = $this->repository->getProjectId();
     $_REQUEST['repo_id'] = $this->repository->getId();
     $_REQUEST['repo_name'] = $this->repository->getFullName();
     $_GET['p'] = $_REQUEST['repo_name'] . '.git';
     $_REQUEST['repo_path'] = $this->repository->getPath();
     $_REQUEST['project_dir'] = $this->repository->getProject()->getUnixName();
     $_REQUEST['git_root_path'] = $this->repository->getGitRootPath();
     $_REQUEST['action'] = 'view';
     $this->preSanitizeRequestForGitphp();
     if (empty($_REQUEST['noheader'])) {
         echo '<div id="gitphp" class="plugin_git_gitphp">';
     }
     include $this->getGitPhpIndexPath();
     if (empty($_REQUEST['noheader'])) {
         echo '</div>';
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:28,代码来源:GitPhpViewer.class.php

示例3: updateRepositoryMirrors

 public function updateRepositoryMirrors(GitRepository $repository, array $mirror_ids)
 {
     if ($this->mirror_data_mapper->doesAllSelectedMirrorIdsExist($mirror_ids) && $this->mirror_data_mapper->unmirrorRepository($repository->getId()) && $this->mirror_data_mapper->mirrorRepositoryTo($repository->getId(), $mirror_ids)) {
         $this->history_dao->groupAddHistory("git_repo_mirroring_update", $repository->getName(), $repository->getProjectId());
         return true;
     }
     return false;
 }
开发者ID:blestab,项目名称:tuleap,代码行数:8,代码来源:MirrorUpdater.php

示例4: getRemoteRepositoryInfoError

 private function getRemoteRepositoryInfoError()
 {
     $date = DateHelper::timeAgoInWords($this->project_creator_status->getEventDate($this->repository), false, true);
     $url = GIT_BASE_URL . '/?action=repo_management&group_id=' . $this->repository->getProjectId() . '&repo_id=' . $this->repository->getId() . '&pane=gerrit';
     $html = '';
     $html .= '<div class="alert alert-error gerrit_url">';
     $html .= $GLOBALS['Language']->getText('plugin_git', 'delegated_to_gerrit_error', array($date, $url), CODENDI_PURIFIER_DISABLED);
     $html .= '</div>';
     return $html;
 }
开发者ID:blestab,项目名称:tuleap,代码行数:10,代码来源:ContentGerrit.php

示例5: launchForRepository

 private function launchForRepository(GitRepository $repository)
 {
     $res = $this->dao->retrieveTriggersPathByRepository($repository->getId());
     if ($res && !$res->isError() && $res->rowCount() > 0) {
         foreach ($res as $row) {
             try {
                 $this->jenkins_client->setToken($row['token'])->launchJobBuild($row['job_url']);
             } catch (Exception $exception) {
                 $this->logger->error(__CLASS__ . '[' . $repository->getId() . '] ' . $exception->getMessage());
             }
         }
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:13,代码来源:Launcher.class.php

示例6: getItemWrapper

 /**
  * Get Item wrapper
  *
  * @param GitRepository $repo  the string representation of the item
  * @param string        $inner the string representation of the item
  *
  * @return string the $inner encapsulated in its own wrapper
  */
 protected function getItemWrapper(GitRepository $repo, $inner)
 {
     if ($repo->getBackend() instanceof Git_Backend_Gitolite) {
         return '<option value="' . $repo->getId() . '">' . $inner . '</option>';
     }
     return '';
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:15,代码来源:GitViewsRepositoriesTraversalStrategy_Selectbox.class.php

示例7: getRepositoryBaseUrl

 /**
  * @param GitRepository $repository
  * @return string the base url to access the git repository regarding plugin configuration
  */
 public function getRepositoryBaseUrl(GitRepository $repository)
 {
     if ($this->git_plugin->areFriendlyUrlsActivated()) {
         return GIT_BASE_URL . '/' . $repository->getProject()->getUnixName() . '/' . $repository->getFullName();
     } else {
         return GIT_BASE_URL . '/index.php/' . $repository->getProjectId() . '/view/' . $repository->getId() . '/';
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:12,代码来源:GitRepositoryUrlManager.class.php

示例8: canBeReadByAnonymous

 private function canBeReadByAnonymous(GitRepository $repository)
 {
     $ugroup_ids = $this->permissions_manager->getAuthorizedUgroupIds($repository->getId(), Git::PERM_READ);
     foreach ($ugroup_ids as $ugroup_id) {
         if ($ugroup_id == ProjectUGroup::ANONYMOUS) {
             return true;
         }
     }
     return false;
 }
开发者ID:rinodung,项目名称:tuleap,代码行数:10,代码来源:CommandFactory.class.php

示例9: sendErrorNotification

 private function sendErrorNotification(GitRepository $repository)
 {
     $user = $this->getRequester();
     if (!$user->isAnonymous()) {
         $factory = new BaseLanguageFactory();
         $language = $factory->getBaseLanguage($user->getLocale());
         $url = get_server_url() . GIT_BASE_URL . '/?action=repo_management&group_id=' . $repository->getProjectId() . '&repo_id=' . $repository->getId() . '&pane=gerrit';
         $notification = new Notification(array($user->getEmail()), $language->getText('plugin_git', 'delegated_to_gerrit_error_mail_subject', array($repository->getFullName())), $language->getText('plugin_git', 'delegated_to_gerrit_error_mail_body', array($repository->getFullName(), $url)), $language->getText('plugin_git', 'delegated_to_gerrit_error_mail_body', array($repository->getFullName(), $url)), $url, 'git');
         $this->mail_builder->buildAndSendEmail($repository->getProject(), $notification, new MailEnhancer());
     }
 }
开发者ID:blestab,项目名称:tuleap,代码行数:11,代码来源:SystemEvent_GIT_GERRIT_MIGRATION.class.php

示例10: areRegisteredUsersAllowedTo

 /** @return bool */
 public function areRegisteredUsersAllowedTo($permission_type, GitRepository $repository)
 {
     if ($permission_type == Git::SPECIAL_PERM_ADMIN) {
         return false;
     }
     foreach ($this->permissions_manager->getAuthorizedUgroups($repository->getId(), $permission_type) as $row) {
         if ($row['ugroup_id'] == ProjectUGroup::REGISTERED || $row['ugroup_id'] == ProjectUGroup::ANONYMOUS || $row['ugroup_id'] == ProjectUGroup::AUTHENTICATED) {
             return true;
         }
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:12,代码来源:UserFinder.class.php

示例11: getOptions

 private function getOptions(Project $project, $permission)
 {
     $user_groups = $this->user_group_factory->getAllForProject($project);
     $options = array();
     $selected_values = $this->permissions_manager->getAuthorizedUGroupIdsForProject($project, $this->repository->getId(), $permission);
     foreach ($user_groups as $ugroup) {
         if ($ugroup->getId() == ProjectUGroup::ANONYMOUS && $permission !== Git::PERM_READ) {
             continue;
         }
         $selected = in_array($ugroup->getId(), $selected_values) ? 'selected="selected"' : '';
         $options[] = array('value' => $ugroup->getId(), 'label' => $ugroup->getName(), 'selected' => $selected);
     }
     return $options;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:14,代码来源:GitForkPermissionsManager.class.php

示例12: getHeader

 private function getHeader()
 {
     $html = '';
     $repoId = $this->repository->getId();
     $creator = $this->repository->getCreator();
     $parent = $this->repository->getParent();
     $access = $this->repository->getAccess();
     $creatorName = '';
     if (!empty($creator)) {
         $creatorName = UserHelper::instance()->getLinkOnUserFromUserId($creator->getId());
     }
     // Access type
     $accessType = $this->getAccessType($access, $this->repository->getBackend() instanceof Git_Backend_Gitolite);
     $html .= '<h1>' . $accessType . $this->repository->getFullName() . '</h1>';
     if (!empty($parent)) {
         $html .= '<div id="plugin_git_repo_parent">';
         $html .= $GLOBALS['Language']->getText('plugin_git', 'view_repo_parent_' . $this->repository->getBackendType(), $parent->getHTMLLink($this->url_manager));
         $html .= '</div>';
     }
     return $html;
 }
开发者ID:blestab,项目名称:tuleap,代码行数:21,代码来源:Content.class.php

示例13: test

 public function test(GitRepository $compare)
 {
     return $compare->getId() === $this->repository_id;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:4,代码来源:GitRepositoryManagerTest.php

示例14: displayTab

 private function displayTab($pane)
 {
     echo '<li class="' . ($this->current_pane == $pane->getIdentifier() ? 'active' : '') . '">';
     $url = GIT_BASE_URL . '/?' . http_build_query(array('action' => 'repo_management', 'group_id' => $this->repository->getProjectId(), 'repo_id' => $this->repository->getId(), 'pane' => $pane->getIdentifier()));
     echo '<a href="' . $url . '">' . $pane->getTitle() . '</a></li>';
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:6,代码来源:RepoManagement.class.php

示例15: areThereAnyChanges

 private function areThereAnyChanges(GitRepository $repository, array $mirror_ids, array $current_mirror_ids_per_repository)
 {
     $current_mirrors = array();
     if (isset($current_mirror_ids_per_repository[$repository->getId()])) {
         $current_mirrors = $current_mirror_ids_per_repository[$repository->getId()];
     }
     return count(array_diff($mirror_ids, $current_mirrors)) > 0 || count(array_diff($current_mirrors, $mirror_ids)) > 0;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:8,代码来源:GitActions.class.php


注:本文中的GitRepository::getId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。