• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP ProjectManager类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中ProjectManager的典型用法代码示例。如果您正苦于以下问题:PHP ProjectManager类的具体用法?PHP ProjectManager怎么用?PHP ProjectManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: __construct

 /**
  * Instanciates a new controller.
  *
  * TODO:
  *   - pass $request to actions (e.g. show).
  *
  * @param Codendi_Request           $request
  * @param PlanningFactory           $planning_factory
  * @param Planning_MilestoneFactory $milestone_factory
  */
 public function __construct(Codendi_Request $request, Planning_MilestoneFactory $milestone_factory, ProjectManager $project_manager, Planning_VirtualTopMilestonePaneFactory $top_milestone_pane_factory)
 {
     parent::__construct('agiledashboard', $request);
     $this->milestone_factory = $milestone_factory;
     $this->top_milestone_pane_factory = $top_milestone_pane_factory;
     $this->project = $project_manager->getProject($request->get('group_id'));
 }
开发者ID:ansarbek,项目名称:tuleap,代码行数:17,代码来源:VirtualTopMilestoneController.class.php


示例2: __construct

 /**
  * Instanciates a new controller.
  *
  * TODO:
  *   - pass $request to actions (e.g. show).
  *
  * @param Codendi_Request           $request
  * @param PlanningFactory           $planning_factory
  * @param Planning_MilestoneFactory $milestone_factory
  */
 public function __construct(Codendi_Request $request, Planning_MilestoneFactory $milestone_factory, ProjectManager $project_manager, Planning_MilestonePaneFactory $pane_factory, AgileDashboard_Milestone_Pane_PanePresenterBuilderFactory $pane_presenter_builder_factory)
 {
     parent::__construct('agiledashboard', $request);
     $this->milestone_factory = $milestone_factory;
     $this->pane_factory = $pane_factory;
     $this->pane_presenter_builder_factory = $pane_presenter_builder_factory;
     $this->project = $project_manager->getProject($request->get('group_id'));
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:18,代码来源:MilestoneController.class.php


示例3: __construct

 public function __construct(array $hit, ProjectManager $project_manager)
 {
     $project = $project_manager->getProject($hit['fields']['group_id']);
     $this->item_title = $hit['fields']['title'];
     $this->url = '/plugins/docman/?group_id=' . $hit['fields']['group_id'] . '&id=' . $hit['fields']['id'] . '&action=details';
     $this->permissions = implode(', ', $hit['fields']['permissions']);
     $this->project_name = $project->getPublicName();
     $this->highlight = isset($hit['highlight']['file']) ? array_shift($hit['highlight']['file']) : '';
 }
开发者ID:nickl-,项目名称:tuleap,代码行数:9,代码来源:SearchResult.class.php


示例4: update

 /**
  * Select a PM from its username or password
  * 
  * @param ProjectManager $pm
  * @return array the selected row in the db
  */
 public function update($pm)
 {
     $sql = $this->dao->prepare("UPDATE project_manager set `password` = :password WHERE `pm_id` = :pm_id;");
     $sql->bindValue(":pm_id", $pm->pm_id(), \PDO::PARAM_INT);
     $sql->bindValue(":password", $pm->password(), \PDO::PARAM_STR);
     try {
         return $sql->execute();
     } catch (Exception $exc) {
         echo $exc->getTraceAsString();
     }
 }
开发者ID:tymiles003,项目名称:FieldWorkManager,代码行数:17,代码来源:LoginDal.php


示例5: __construct

 public function __construct(array $results, ProjectManager $project_manager, array $submitted_facets)
 {
     if (isset($results['terms'])) {
         foreach ($results['terms'] as $result) {
             $project = $project_manager->getProject($result['term']);
             if ($project && !$project->isError()) {
                 $checked = isset($submitted_facets['group_id']) && in_array($project->getGroupId(), $submitted_facets['group_id']);
                 $this->facets[] = new ElasticSearch_SearchResultProjectsFacet($project, $result['count'], $checked);
             }
         }
     }
 }
开发者ID:nterray,项目名称:tuleap,代码行数:12,代码来源:SearchResultProjectsFacetCollection.class.php


示例6: aCreationValidator

    protected function aCreationValidator($request_data, $required_custom_descriptions) {
        $request = aRequest()->withParams($request_data)->build();
        $creation_request = new Project_OneStepCreation_OneStepCreationRequest($request, ProjectManager::instance());
        $validator = new Project_OneStepCreation_OneStepCreationValidator($creation_request, $required_custom_descriptions);

        return $validator;
    }
开发者ID:rinodung,项目名称:tuleap,代码行数:7,代码来源:OneStepProjectCreationValidatorTest.php


示例7: __construct

 public function __construct()
 {
     $this->project_manager = ProjectManager::instance();
     $this->user_manager = UserManager::instance();
     $this->project_helper = new \DataInit\ProjectHelper();
     $GLOBALS['Language'] = new BaseLanguage('en_US', 'en_US');
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:GuineaPig.php


示例8: PHPWikiService

 /**
  * Constructor
  */
 function PHPWikiService($id)
 {
     global $LANG, $is_wiki_page;
     //used so the search box will add the necessary element to the pop-up box
     $is_wiki_page = 1;
     /* 
      * Check given id 
      */
     $this->gid = (int) $id;
     if (empty($this->gid)) {
         exit_no_group();
     }
     $pm = ProjectManager::instance();
     $go = $pm->getProject($this->gid);
     if (!$go) {
         exit_no_group();
     }
     $this->wiki = new PHPWiki($this->gid);
     // Check access right
     $this->checkPermissions();
     // If Wiki for project doesn't exist, propose creation ... if user is project admin or wiki admin
     if (!$this->wiki->exist()) {
         if (!user_ismember($this->gid, 'W2') && !user_ismember($this->gid, 'A')) {
             exit_wiki_empty();
         }
     }
     // Set language for phpWiki
     if ($this->wiki->getLanguage_id()) {
         define('DEFAULT_LANGUAGE', $this->wiki->getLanguage_id());
         $LANG = $this->wiki->getLanguage_id();
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:35,代码来源:PHPWikiService.class.php


示例9: getContent

 public function getContent()
 {
     $request =& HTTPRequest::instance();
     $group_id = $request->get('group_id');
     $pm = ProjectManager::instance();
     $project = $pm->getProject($group_id);
     $res_admin = db_query("SELECT user.user_id AS user_id,user.user_name AS user_name, user.realname as realname " . "FROM user,user_group " . "WHERE user_group.user_id=user.user_id AND user_group.group_id=" . db_ei($group_id) . " AND " . "user_group.admin_flags = 'A'");
     if (db_numrows($res_admin) > 0) {
         $user_helper = UserHelper::instance();
         $hp = Codendi_HTMLPurifier::instance();
         $em = EventManager::instance();
         echo '<span class="develtitle">' . $GLOBALS['Language']->getText('include_project_home', 'proj_admins') . ':</span><br />';
         while ($row_admin = db_fetch_array($res_admin)) {
             $display_name = '';
             $em->processEvent('get_user_display_name', array('user_id' => $row_admin['user_id'], 'user_name' => $row_admin['user_name'], 'realname' => $row_admin['realname'], 'user_display_name' => &$display_name));
             if (!$display_name) {
                 $display_name = $hp->purify($user_helper->getDisplayNameFromUserId($row_admin['user_id']));
             }
             echo '<a href="/users/' . $row_admin['user_name'] . '/">' . $display_name . '</a><br />';
         }
     }
     echo '<span class="develtitle">' . $GLOBALS['Language']->getText('include_project_home', 'proj_members') . ':</span><br />';
     // count of developers on this project
     $res_count = db_query("SELECT user_id FROM user_group WHERE group_id=" . db_ei($group_id));
     echo db_numrows($res_count);
     echo ' <a href="/project/memberlist.php?group_id=' . $group_id . '">[' . $GLOBALS['Language']->getText('include_project_home', 'view_members') . ']</a>';
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:27,代码来源:Widget_ProjectMembers.class.php


示例10: bootstrap

 /**
  * Bootstrap the application and
  * call the other bootstrap classes
  * from the projects (if they exist)
  *
  * @return self
  */
 public function bootstrap($environment = Application::ENVIRONMENT_WEB)
 {
     static::$environment = $environment;
     // Setup application
     $this->setup();
     try {
         Buffer::start();
         // Call own bootstrap
         (new Bootstrap($this))->autoCall();
         // Call bootstrap of active project
         $project = ProjectManager::getActiveProject();
         if ($project) {
             // Save it in case for further use
             $bootstrap = $project->bootstrap($this);
         }
     } catch (\Exception $err) {
         switch (static::$environment) {
             case Application::ENVIRONMENT_WEB:
                 self::renderException(array($err));
                 break;
             case Application::ENVIRONMENT_CMD:
                 throw $err;
                 break;
         }
     }
     return $this;
 }
开发者ID:fewlines,项目名称:core,代码行数:34,代码来源:Application.php


示例11: displayNotificationEmail

 function displayNotificationEmail()
 {
     $html = '';
     $html .= '<h3>' . $GLOBALS['Language']->getText('plugin_docman', 'details_approval_email_title') . '</h3>';
     $atsm = new Docman_ApprovalTableNotificationCycle();
     $atsm->setItem($this->item);
     $atf =& Docman_ApprovalTableFactoriesFactory::getFromItem($this->item);
     $table = $atf->getTable(false);
     $atsm->setTable($table);
     $um =& UserManager::instance();
     $owner =& $um->getUserById($table->getOwner());
     $atsm->setOwner($owner);
     $atsm->sendNotifReviewer($owner);
     $html .= $GLOBALS['Language']->getText('plugin_docman', 'details_approval_email_subject') . ' ' . $atsm->getNotificationSubject() . "\n";
     $html .= '<p class="docman_approval_email">';
     if (ProjectManager::instance()->getProject($this->item->getGroupId())->getTruncatedEmailsUsage()) {
         $html .= $GLOBALS['Language']->getText('plugin_docman', 'truncated_email');
     } else {
         $html .= htmlentities(quoted_printable_decode($atsm->getNotificationBodyText()), ENT_COMPAT, 'UTF-8');
     }
     $html .= '</p>';
     $backurl = $this->url . '&action=approval_create&id=' . $this->item->getId();
     $html .= '<a href="' . $backurl . '">' . $GLOBALS['Language']->getText('plugin_docman', 'details_approval_email_back') . '</a>';
     return $html;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:25,代码来源:Docman_View_ItemDetailsSectionApprovalCreate.class.php


示例12: svn_data_get_revision_detail

function svn_data_get_revision_detail($group_id, $commit_id, $rev_id = 0, $order = '')
{
    $order_str = "";
    if ($order) {
        if ($order != 'filename') {
            // SQLi Warning: no real possibility to escape $order here.
            // We rely on a proper filtering of user input by calling methods.
            $order_str = " ORDER BY " . $order;
        } else {
            $order_str = " ORDER BY dir, file";
        }
    }
    //check user access rights
    $pm = ProjectManager::instance();
    $project = $pm->getProject($group_id);
    $forbidden = svn_utils_get_forbidden_paths(user_getname(), $project->getSVNRootPath());
    $where_forbidden = "";
    if (!empty($forbidden)) {
        while (list($no_access, ) = each($forbidden)) {
            $where_forbidden .= " AND svn_dirs.dir not like '%" . db_es(substr($no_access, 1)) . "%' ";
        }
    }
    // if the subversion revision id is given then it akes precedence on
    // the internal commit_id (this is to make it easy for users to build
    // URL to access a revision
    if ($rev_id) {
        // To be done -> get the commit ID from the svn-commit table
        $sql = "SELECT svn_commits.description, svn_commits.date, svn_commits.revision, svn_checkins.type,svn_checkins.commitid,svn_dirs.dir,svn_files.file " . "FROM svn_dirs, svn_files, svn_checkins, svn_commits " . "WHERE svn_checkins.fileid=svn_files.id " . "AND svn_checkins.dirid=svn_dirs.id " . "AND svn_checkins.commitid=svn_commits.id " . "AND svn_commits.revision=" . db_ei($rev_id) . " " . "AND svn_commits.group_id=" . db_ei($group_id) . " " . $where_forbidden . $order_str;
    } else {
        $sql = "SELECT svn_commits.description, svn_commits.date, svn_commits.revision, svn_checkins.type,svn_checkins.commitid,svn_dirs.dir,svn_files.file " . "FROM svn_dirs, svn_files, svn_checkins, svn_commits " . "WHERE svn_checkins.fileid=svn_files.id " . "AND svn_checkins.dirid=svn_dirs.id " . "AND svn_checkins.commitid=svn_commits.id " . "AND svn_commits.id=" . db_ei($commit_id) . " " . $where_forbidden . $order_str;
    }
    $result = db_query($sql);
    return $result;
}
开发者ID:uniteddiversity,项目名称:tuleap,代码行数:34,代码来源:svn_data.php


示例13: __construct

 /**
  * Constructor.
  *
  * @param Integer $groupId     Project Id
  * @param Integer $weeksNumber Statistics duration in weeks
  *
  * @return Void
  */
 public function __construct($groupId, $weeksNumber)
 {
     $dao = new GitDao();
     // TODO: Optionally include presonal forks in repo list
     $allRepositories = $dao->getProjectRepositoryList($groupId);
     $um = UserManager::instance();
     $user = $um->getCurrentUser();
     $repoFactory = new GitRepositoryFactory($dao, ProjectManager::instance());
     foreach ($allRepositories as $repo) {
         $repository = $repoFactory->getRepositoryById($repo['repository_id']);
         if ($repository->userCanRead($user)) {
             $this->repoList[] = $repository;
         }
     }
     $this->displayChart = false;
     $this->weeksNumber = min($weeksNumber, self::MAX_WEEKSNUMBER);
     // Init some class properties according to 'weeks number' parameter
     $today = $_SERVER['REQUEST_TIME'];
     $startPeriod = strtotime("-{$this->weeksNumber} weeks");
     $weekInSeconds = self::WEEKS_IN_SECONDS;
     for ($i = $startPeriod + $weekInSeconds; $i < $today + $weekInSeconds; $i += $weekInSeconds) {
         $this->dates[] = date('M d', $i);
         $this->weekNum[] = intval(date('W', $i));
         $this->year[] = intval(date('Y', $i));
     }
 }
开发者ID:nterray,项目名称:tuleap,代码行数:34,代码来源:Git_LastPushesGraph.class.php


示例14: tearDown

 public function tearDown()
 {
     UserManager::clearInstance();
     ProjectManager::clearInstance();
     SystemEventManager::clearInstance();
     unset($GLOBALS['Language']);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:ProjectCreatorTest.php


示例15: doCreate

 private function doCreate()
 {
     $data = $this->creation_request->getProjectValues();
     require_once 'www/project/create_project.php';
     $group_id = create_project($data);
     return $this->project_manager->getProject($group_id);
 }
开发者ID:rinodung,项目名称:tuleap,代码行数:7,代码来源:OneStepCreationController.class.php


示例16: process

 /**
  * Execute action
  * 
  * @see src/common/system_event/SystemEvent::process()
  */
 public function process()
 {
     $user_ids = $this->getParametersAsArray();
     $project_ids = array();
     // Get all projects the user is member of (project member or user group member)
     $um = $this->getUserManager();
     foreach ($user_ids as $user_id) {
         $user = $um->getUserById($user_id);
         if ($user && ($user->isActive() || $user->isRestricted())) {
             $prjs = $user->getAllProjects();
             foreach ($prjs as $pid) {
                 if (!isset($project_ids[$pid])) {
                     $project_ids[$pid] = $pid;
                 }
             }
         }
     }
     // Update SVNAccessFile of projects
     $backendSVN = $this->getBackendSVN();
     foreach ($project_ids as $project_id) {
         $project = $this->project_manager->getProject($project_id);
         if ($project && $this->ldap_project_manager->hasSVNLDAPAuth($project->getId())) {
             $backendSVN->updateProjectSVNAccessFile($project);
         }
     }
     $this->done();
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:32,代码来源:SystemEvent_PLUGIN_LDAP_UPDATE_LOGIN.class.php


示例17: getProjectFromRepositoryPath

 /**
  * Returns the Project that match the given string
  *
  * @param String $repository_path
  * @return Project
  * @throws Exception
  */
 public function getProjectFromRepositoryPath($repository_path)
 {
     $unix_group_name = substr($repository_path, strlen(ForgeConfig::get('svn_prefix')) + 1);
     $project = $this->project_manager->getProjectByUnixName($unix_group_name);
     if ($project && !$project->isError() && !$project->isDeleted()) {
         return $project;
     }
     throw new Exception('Invalid project');
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:16,代码来源:SVN_Hooks.class.php


示例18: renameProject

 public function renameProject($old_name, $new_name)
 {
     $git_modifications = new Git_Gitolite_GitModifications();
     $project = $this->project_manager->getProjectByUnixName($new_name);
     $this->moveProjectFiles($old_name, $new_name, $git_modifications, $project);
     $this->modifyProjectConf($old_name, $new_name, $git_modifications, $project);
     $this->modifyIncludersConf($old_name, $new_name, $git_modifications, $project);
     return $git_modifications;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:9,代码来源:GitoliteConfWriter.php


示例19: getProjectsAuthorizingTokens

 /**
  * @return Project[]
  */
 public function getProjectsAuthorizingTokens()
 {
     $projects = array();
     foreach ($this->dao->getProjectsAuthorizingTokens() as $row) {
         $project_id = $row['project_id'];
         $projects[] = $this->project_manager->getProject($project_id);
     }
     return $projects;
 }
开发者ID:ansarbek,项目名称:tuleap,代码行数:12,代码来源:SVN_TokenUsageManager.php


示例20: migrateProject

 private function migrateProject($project_to_migrate)
 {
     $project = $this->project_manager->getProjectFromAutocompleter($project_to_migrate);
     if ($project && $this->wiki_migrator->canMigrate($project)) {
         $this->system_event_manager->createEvent(SystemEvent_PHPWIKI_SWITCH_TO_PLUGIN::NAME, $project->getId(), SystemEvent::PRIORITY_HIGH);
         $GLOBALS['Response']->addFeedback(Feedback::INFO, $GLOBALS['Language']->getText('plugin_phpwiki', 'allowed_project_allow_project'));
     } else {
         $this->sendUpdateProjectListError();
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:10,代码来源:PHPWikiAdminController.class.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ProjectMilestones类代码示例发布时间:2022-05-23
下一篇:
PHP ProjectConfigurator类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap