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


PHP Project::getUnixName方法代码示例

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


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

示例1: __construct

 public function __construct($controller, Git_GitRepositoryUrlManager $url_manager, Git_Mirror_MirrorDataMapper $mirror_data_mapper, GitPermissionsManager $permissions_manager)
 {
     parent::__construct($controller);
     $this->groupId = (int) $this->request->get('group_id');
     $this->project = ProjectManager::instance()->getProject($this->groupId);
     $this->projectName = $this->project->getUnixName();
     $this->userName = $this->user->getName();
     $this->git_permissions_manager = $permissions_manager;
     $this->ugroup_manager = new UGroupManager();
     $this->url_manager = $url_manager;
     $this->mirror_data_mapper = $mirror_data_mapper;
 }
开发者ID:rinodung,项目名称:tuleap,代码行数:12,代码来源:GitViews.class.php

示例2: sendMail

 public function sendMail(PFUser $user, Project $project, $tv3_id, $tracker_name)
 {
     $mail = new Codendi_Mail();
     $breadcrumbs = array();
     $breadcrumbs[] = '<a href="' . get_server_url() . '/projects/' . $project->getUnixName(true) . '" />' . $project->getPublicName() . '</a>';
     $mail->getLookAndFeelTemplate()->set('breadcrumbs', $breadcrumbs);
     $mail->addAdditionalHeader("X-Codendi-Project", $project->getUnixName());
     $mail->setFrom($GLOBALS['sys_noreply']);
     $mail->setTo($user->getEmail());
     $mail->setSubject('Output of your migration TV3 -> TV5');
     $mail->setBody($this->getMailBody($tv3_id, $tracker_name));
     $mail->send();
     $this->purgeLogStack();
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:14,代码来源:MailLogger.class.php

示例3: service_replace_template_name_in_link

/**
 * @return string
 */
function service_replace_template_name_in_link($link, array $template, Project $project)
{
    $link = preg_replace('#(/www/|/projects/|group=)' . $template['name'] . '(/|&|$)#', '$1' . $project->getUnixName() . '$2', $link);
    $link = preg_replace('/group_id=' . $template['id'] . '([^\\d]|$)/', 'group_id=' . $project->getGroupId() . '$1', $link);
    EventManager::instance()->processEvent(Event::SERVICE_REPLACE_TEMPLATE_NAME_IN_LINK, array('link' => &$link, 'template' => $template, 'project' => $project));
    return $link;
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:10,代码来源:service.php

示例4: __construct

 public function __construct(Project $project, PFUser $pfuser, $suffix)
 {
     parent::__construct($pfuser->toRow());
     $this->setStatus(PFUser::STATUS_RESTRICTED);
     $this->setRealName(self::REAL_NAME);
     $this->setUserName(self::NAME_PREFIX . $project->getUnixName() . $suffix);
     $this->project = $project;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:8,代码来源:GenericUser.class.php

示例5: __construct

 public function __construct(Project $project, $count, $checked)
 {
     $this->label = $project->getUnixName();
     $this->count = $count;
     $this->value = $project->getGroupId();
     if ($checked) {
         $this->checked = 'checked="checked"';
     }
 }
开发者ID:nterray,项目名称:tuleap,代码行数:9,代码来源:SearchResultProjectsFacet.class.php

示例6: getForbiddenPaths

 /**
  * Return SVN path the user is not allowed to see
  * 
  * @param User $user
  * 
  * @return string 
  */
 protected function getForbiddenPaths(User $user)
 {
     $forbidden = svn_utils_get_forbidden_paths($user->getName(), $this->project->getUnixName(false));
     $where_forbidden = "";
     foreach ($forbidden as $no_access => $v) {
         $where_forbidden .= " AND svn_dirs.dir not like '" . db_es(substr($no_access, 1)) . "%'";
     }
     return $where_forbidden;
 }
开发者ID:nterray,项目名称:tuleap,代码行数:16,代码来源:SVN_LogFactory.class.php

示例7: __construct

 /**
  * @param string $project
  */
 public function __construct(Project $project)
 {
     $this->logger = new BackendLogger();
     $this->project = $project;
     $this->project_name = $project->getUnixName();
     $this->project_id = $project->getID();
     $this->dao = new MediawikiDao();
     $this->resource_restrictor = new MediawikiSiteAdminResourceRestrictor(new MediawikiSiteAdminResourceRestrictorDao(), ProjectManager::instance());
 }
开发者ID:amanikamail,项目名称:tuleap,代码行数:12,代码来源:MediawikiInstantiater.class.php

示例8: importLanguage

 private function importLanguage(Project $project, $language)
 {
     $this->logger->info("Set language to {$language} for {$project->getUnixName()}");
     try {
         $this->language_manager->saveLanguageOption($project, $language);
     } catch (Mediawiki_UnsupportedLanguageException $e) {
         $this->logger->warn("Could not set up the language for {$project->getUnixName()} mediawiki, {$language} is not sopported.");
     }
 }
开发者ID:AdriandeCita,项目名称:tuleap,代码行数:9,代码来源:MediaWikiXMLImporter.class.php

示例9: fetchReposConfig

 protected function fetchReposConfig(Project $project, GitRepository $repository)
 {
     $repo_full_name = $this->repoFullName($repository, $project->getUnixName());
     $repo_config = 'repo ' . $repo_full_name . PHP_EOL;
     $repo_config .= $this->fetchMailHookConfig($project, $repository);
     $repo_config .= $this->permissions_serializer->getForRepository($repository);
     $description = preg_replace("%\\s+%", ' ', $repository->getDescription());
     $repo_config .= "{$repo_full_name} = \"{$description}\"" . PHP_EOL;
     return $repo_config . PHP_EOL;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:10,代码来源:ProjectSerializer.class.php

示例10: createProjectWithPermissionsOnly

 public function createProjectWithPermissionsOnly(Git_RemoteServer_GerritServer $server, Project $project, $admin_group_name)
 {
     try {
         $parent_project_name = $project->getUnixName();
         $this->logger->info("Gerrit REST driver: Create parent project {$parent_project_name}");
         $this->sendRequest($server, $this->guzzle_client->put($this->getGerritURL($server, '/projects/' . urlencode($parent_project_name)), $this->getRequestOptions(array(self::HEADER_CONTENT_TYPE => self::MIME_JSON)), json_encode(array('description' => "Migration of {$parent_project_name} from Tuleap", 'permissions_only' => true, 'owners' => array($admin_group_name)))));
         $this->logger->info("Gerrit: Permissions-only project {$parent_project_name} successfully initialized");
     } catch (Exception $exception) {
         $this->throwGerritException("Gerrit: Permissions-only project {$parent_project_name} not created: " . $exception->getMessage());
     }
 }
开发者ID:pdaniel-frk,项目名称:tuleap,代码行数:11,代码来源:GerritREST.class.php

示例11: makeGerritProjectReadOnly

 private function makeGerritProjectReadOnly(GitRepository $repository, Git_RemoteServer_GerritServer $server, Project $project)
 {
     try {
         $this->driver_factory->getDriver($server)->makeGerritProjectReadOnly($server, $project->getUnixName() . '/' . $repository->getName());
     } catch (Exception $e) {
         $this->error($e->getMessage() . $e->getTraceAsString());
         return false;
     }
     $this->done();
     return true;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:11,代码来源:SystemEvent_GIT_GERRIT_PROJECT_READONLY.class.php

示例12: checkServiceEnabled

 /**
  * Check that the service is used and the plugin is allowed for project $project
  * if it is not the case then exit with an error
  *
  * @param Project         $project
  * @param Codendi_Request $request
  *
  * @return bool true if success. Otherwise the process terminates.
  */
 public function checkServiceEnabled(Project $project, Codendi_Request $request)
 {
     if ($project->usesService('plugin_tracker')) {
         return true;
     }
     header("HTTP/1.0 404 Not Found");
     if (!$request->isAjax()) {
         $GLOBALS['Response']->addFeedback('error', "The project doesn't use the 'tracker v5' service");
         $GLOBALS['HTML']->redirect('/projects/' . $project->getUnixName() . '/');
     }
     exit;
 }
开发者ID:blestab,项目名称:tuleap,代码行数:21,代码来源:TrackerManager.class.php

示例13: getSvnPath

 public function getSvnPath(User $user, Project $project, $svn_path)
 {
     $paths = array();
     $repository_path = $GLOBALS['svn_prefix'] . '/' . $project->getUnixName();
     $content = $this->getDirectoryListing($repository_path, $svn_path);
     foreach ($content as $line) {
         if ($this->svn_permissions_manager->userCanRead($user, $project, $line)) {
             $paths[] = $this->extractDirectoryContent($line, $svn_path);
         }
     }
     return array_filter($paths);
 }
开发者ID:nterray,项目名称:tuleap,代码行数:12,代码来源:SVN_RepositoryListing.class.php

示例14: __construct

 /**
  * @param Project|string $project
  * @param MediawikiManager $mediawiki_manager
  * @param MediawikiLanguageManager $language_manager
  * @param MediawikiVersionManager $version_manager
  * @param MediawikiMLEBExtensionManager $mleb_manager
  */
 public function __construct(Project $project, MediawikiManager $mediawiki_manager, MediawikiLanguageManager $language_manager, MediawikiVersionManager $version_manager, MediawikiMLEBExtensionManager $mleb_manager)
 {
     $this->logger = new BackendLogger();
     $this->project = $project;
     $this->project_name = $project->getUnixName();
     $this->project_id = $project->getID();
     $this->dao = new MediawikiDao();
     $this->mediawiki_manager = $mediawiki_manager;
     $this->language_manager = $language_manager;
     $this->version_manager = $version_manager;
     $this->mleb_manager = $mleb_manager;
     $this->resource_restrictor = new MediawikiSiteAdminResourceRestrictor(new MediawikiSiteAdminResourceRestrictorDao(), ProjectManager::instance());
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:20,代码来源:MediawikiInstantiater.class.php

示例15: getCurrentBindingHTML

 /**
  * Get the HTML output for current binding
  *
  * @param Project $currentProject Project of the currently bound ugroup
  * @param ProjectUGroup  $currentSource  Currently bound ugroup
  *
  * @return String
  */
 private function getCurrentBindingHTML(Project $currentProject = null, ProjectUGroup $currentSource = null)
 {
     if ($currentSource) {
         $currentBindHTML = '';
         if ($currentSource && $currentProject->userIsAdmin()) {
             $currentBindHTML .= $GLOBALS['Language']->getText('project_ugroup_binding', 'current_binded', array('<a href="/project/admin/editugroup.php?group_id=' . $currentProject->getID() . '&ugroup_id=' . $currentSource->getId() . '&func=edit" ><b>' . $currentSource->getName() . '</b></a>', '<a href="/projects/' . $currentProject->getUnixName() . '" ><b>' . $currentProject->getPublicName() . '</b></a>'));
         }
         $currentBindHTML .= '<form action="" method="post"><input type="hidden" name="action" value="remove_binding" /><input type="submit" value="' . $GLOBALS['Language']->getText('project_ugroup_binding', 'remove_binding') . '"/></form>';
     } else {
         $currentBindHTML = $GLOBALS['Language']->getText('project_ugroup_binding', 'no_binding');
     }
     return $currentBindHTML;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:21,代码来源:EditBinding.class.php


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