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


PHP GitRepository::getFullName方法代码示例

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


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

示例1: 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

示例2: 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

示例3: getPushDetails

 /**
  *
  * Behaviour extracted from official email hook prep_for_email() function
  *
  * @param GitRepository $repository
  * @param PFUser $user
  * @param type $oldrev
  * @param type $newrev
  * @param type $refname
  * @return Git_Hook_PushDetails
  */
 public function getPushDetails(GitRepository $repository, PFUser $user, $oldrev, $newrev, $refname)
 {
     $change_type = Git_Hook_PushDetails::ACTION_ERROR;
     $revision_list = array();
     $rev_type = '';
     try {
         if ($oldrev == self::FAKE_EMPTY_COMMIT) {
             $revision_list = $this->exec_repo->revListSinceStart($refname, $newrev);
             $change_type = Git_Hook_PushDetails::ACTION_CREATE;
         } elseif ($newrev == self::FAKE_EMPTY_COMMIT) {
             $change_type = Git_Hook_PushDetails::ACTION_DELETE;
         } else {
             $revision_list = $this->exec_repo->revList($oldrev, $newrev);
             $change_type = Git_Hook_PushDetails::ACTION_UPDATE;
         }
         if ($change_type == Git_Hook_PushDetails::ACTION_DELETE) {
             $rev_type = $this->exec_repo->getObjectType($oldrev);
         } else {
             $rev_type = $this->exec_repo->getObjectType($newrev);
         }
     } catch (Git_Command_Exception $exception) {
         $this->logger->error(__CLASS__ . " {$repository->getFullName()} {$refname} {$oldrev} {$newrev} " . $exception->getMessage());
     }
     return new Git_Hook_PushDetails($repository, $user, $refname, $change_type, $rev_type, $revision_list);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:36,代码来源:LogAnalyzer.class.php

示例4: 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

示例5: 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

示例6: getRepositoryPushesByWeek

 /**
  * Collect, into an array, logged git pushes matching a given git repository for the given duration.
  *
  * @param GitRepository $repository Git repository we want to fetch its pushes
  *
  * @return Array
  */
 private function getRepositoryPushesByWeek(GitRepository $repository)
 {
     $pushes = array();
     $gitLogDao = new Git_LogDao();
     foreach ($this->weekNum as $key => $w) {
         $res = $gitLogDao->getRepositoryPushesByWeek($repository->getId(), $w, $this->year[$key]);
         if ($res && !$res->isError() && $res->valid()) {
             $row = $res->getRow();
             $pushes[$key] = intval($row['pushes']);
             if ($pushes[$key] > 0) {
                 $this->displayChart = true;
                 $this->legend = $repository->getFullName();
             }
         }
         $pushes = array_pad($pushes, $this->weeksNumber, 0);
     }
     return $pushes;
 }
开发者ID:nterray,项目名称:tuleap,代码行数:25,代码来源:Git_LastPushesGraph.class.php

示例7: repoFullName

 public function repoFullName(GitRepository $repo, $unix_name)
 {
     require_once GIT_BASE_DIR . '/PathJoinUtil.php';
     return unixPathJoin(array($unix_name, $repo->getFullName()));
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:5,代码来源:ProjectSerializer.class.php

示例8: getView

 /**
  * Configure gitphp output
  * 
  * @param GitRepository $repository
  */
 public function getView($repository)
 {
     include_once 'common/include/Codendi_HTMLPurifier.class.php';
     if (empty($_REQUEST['a'])) {
         $_REQUEST['a'] = 'summary';
     }
     set_time_limit(300);
     $_GET['a'] = $_REQUEST['a'];
     $_REQUEST['group_id'] = $this->groupId;
     $_REQUEST['repo_id'] = $repository->getId();
     $_REQUEST['repo_name'] = $repository->getFullName();
     $_GET['p'] = $_REQUEST['repo_name'] . '.git';
     $_REQUEST['repo_path'] = $repository->getPath();
     $_REQUEST['project_dir'] = $repository->getProject()->getUnixName();
     $_REQUEST['git_root_path'] = $repository->getGitRootPath();
     $_REQUEST['action'] = 'view';
     if (empty($_REQUEST['noheader'])) {
         //echo '<hr>';
         echo '<div id="gitphp">';
     }
     include $this->getGitPhpIndexPath();
     if (empty($_REQUEST['noheader'])) {
         echo '</div>';
     }
 }
开发者ID:nterray,项目名称:tuleap,代码行数:30,代码来源:GitViews.class.php

示例9: delete

 public function delete(GitRepository $repository)
 {
     $id = $repository->getId();
     $projectId = $repository->getProjectId();
     $id = $this->da->escapeInt($id);
     $projectId = $this->da->escapeInt($projectId);
     if (empty($id) || empty($projectId)) {
         throw new GitDaoException($GLOBALS['Language']->getText('plugin_git', 'dao_delete_params'));
     }
     $deletionDate = $repository->getDeletionDate();
     $projectName = $repository->getProject()->getUnixName();
     $backup_path = str_replace('/', '_', $repository->getFullName());
     $backup_path .= '_' . strtotime($deletionDate);
     $backup_path = $projectName . '_' . $backup_path;
     $backup_path = $this->da->quoteSmart($backup_path);
     $deletionDate = $this->da->quoteSmart($deletionDate);
     $query = ' UPDATE ' . $this->getTable() . ' SET ' . self::REPOSITORY_DELETION_DATE . '=' . $deletionDate . ', ' . self::REPOSITORY_BACKUP_PATH . '=' . $backup_path . ' WHERE ' . self::REPOSITORY_ID . '=' . $id . ' AND ' . self::FK_PROJECT_ID . '=' . $projectId;
     $r = $this->update($query);
     $ar = $this->da->affectedRows();
     if ($r === false || $ar == 0) {
         throw new GitDaoException($GLOBALS['Language']->getText('plugin_git', 'dao_delete_error') . ' ' . $this->da->isError());
     }
     if ($ar == 1) {
         return true;
     }
     return false;
 }
开发者ID:blestab,项目名称:tuleap,代码行数:27,代码来源:GitDao.class.php

示例10: getRepositoryFullName

 private function getRepositoryFullName(GitRepository $repository)
 {
     return $repository->getFullName();
 }
开发者ID:rinodung,项目名称:tuleap,代码行数:4,代码来源:AdminMassUpdatePresenter.class.php

示例11: getGerritProjectName

 public function getGerritProjectName(GitRepository $repository)
 {
     $project = $repository->getProject()->getUnixName();
     $repo = $repository->getFullName();
     return "{$project}/{$repo}";
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:6,代码来源:ProjectNameBuilder.class.php

示例12: redirectIfTryingToViewRepositoryAndUserFriendlyURLsActivated

 private function redirectIfTryingToViewRepositoryAndUserFriendlyURLsActivated(Project $project, GitRepository $repository, $parameters)
 {
     if (!$this->getPlugin()->areFriendlyUrlsActivated()) {
         return;
     }
     $request_parameters = $parameters ? '?' . $parameters : '';
     $redirecting_url = GIT_BASE_URL . '/' . $project->getUnixName() . '/' . $repository->getFullName() . $request_parameters;
     header("Location: {$redirecting_url}", TRUE, 301);
 }
开发者ID:LouisRenWeiWei,项目名称:tuleap,代码行数:9,代码来源:Git.class.php

示例13: getHTTPAccessURL

 public function getHTTPAccessURL(GitRepository $repository)
 {
     $http_url = $this->getConfigurationParameter('git_http_url');
     if ($http_url) {
         return $http_url . '/' . $repository->getProject()->getUnixName() . '/' . $repository->getFullName() . '.git';
     }
 }
开发者ID:pdaniel-frk,项目名称:tuleap,代码行数:7,代码来源:Git_Backend_Gitolite.class.php

示例14: getLinkToRepositoryManagement

 private function getLinkToRepositoryManagement(GitRepository $repository)
 {
     $project = $repository->getProject();
     return '<a href="/plugins/git/?action=repo_management&group_id=' . $project->getId() . '&repo_id=' . $repository->getId() . '">' . $project->getUnixName() . '/' . $repository->getFullName() . '</a>';
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:5,代码来源:SystemEvent_GIT_REPO_FORK..php

示例15: __construct

 public function __construct(GitRepository $repository, array $used_mirrors)
 {
     $this->repository_id = $repository->getId();
     $this->name = $repository->getFullName();
     $this->used_mirrors = $used_mirrors;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:6,代码来源:MirroredRepositoryPresenter.php


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