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


PHP Layout::redirect方法代码示例

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


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

示例1: search

 public function search($user)
 {
     try {
         $cross_search_criteria = $this->getCrossSearchCriteriaFromRequest();
         $project_id = $this->request->get('group_id');
         $project = $this->getProject($project_id, $this->project_manager);
         $view = $this->view_builder->build($user, $project, $cross_search_criteria);
         $view->render($user);
     } catch (Tracker_CrossSearch_ProjectNotFoundException $e) {
         $this->layout->addFeedback('error', $e->getMessage());
         $this->layout->redirect('/');
     } catch (Tracker_CrossSearch_ServiceNotUsedException $e) {
         $this->layout->addFeedback('error', $e->getMessage());
         $this->layout->redirect('/projects/' . $project->getUnixName() . '/');
     }
 }
开发者ID:rinodung,项目名称:tuleap,代码行数:16,代码来源:SearchController.class.php

示例2: route

 public function route(HTTPRequest $request, Layout $response)
 {
     $valid_route = new Valid_WhiteList('func', $this->routes);
     $valid_route->required();
     if ($request->valid($valid_route)) {
         $route = $request->get('func');
         $controller = new OpenId_LoginController($this->logger, new OpenId_AccountManager(new Openid_Dao(), UserManager::instance()), $request, $response);
         $controller->{$route}();
     } else {
         $response->addFeedback(Feedback::ERROR, 'Invalid request for ' . __CLASS__);
         $response->redirect('/');
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:13,代码来源:OpenIdRouter.class.php

示例3: fork

 /**
  * Fork a bunch of repositories in a project for a given user
  *
  * @param int    $groupId         The project id
  * @param array  $repos_ids       The array of id of repositories to fork
  * @param string $namespace       The namespace where the new repositories will live
  * @param PFUser   $user            The owner of those new repositories
  * @param Layout $response        The response object
  * @param array  $forkPermissions Permissions to be applied for the new repository
  */
 public function fork(array $repos, Project $to_project, $namespace, $scope, PFUser $user, Layout $response, $redirect_url, array $forkPermissions)
 {
     try {
         if ($this->manager->forkRepositories($repos, $to_project, $user, $namespace, $scope, $forkPermissions)) {
             $this->history_dao->groupAddHistory("git_fork_repositories", $to_project->getID(), $to_project->getID());
             $GLOBALS['Response']->addFeedback('info', $this->getText('successfully_forked'));
             $response->redirect($redirect_url);
         }
     } catch (Exception $e) {
         $GLOBALS['Response']->addFeedback('error', $e->getMessage());
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:22,代码来源:GitActions.class.php

示例4: fork

 /**
  * Fork a bunch of repositories in a project for a given user
  * 
  * @param int    $groupId   The project id
  * @param array  $repos_ids The array of id of repositories to fork
  * @param string $namespace The namespace where the new repositories will live
  * @param User   $user      The owner of those new repositories
  * @param Layout $response  The response object
  */
 public function fork(array $repos, Project $to_project, $namespace, $scope, User $user, Layout $response, $redirect_url)
 {
     try {
         if ($this->manager->forkRepositories($repos, $to_project, $user, $namespace, $scope)) {
             $GLOBALS['Response']->addFeedback('info', $this->getText('successfully_forked'));
             $response->redirect($redirect_url);
         }
     } catch (Exception $e) {
         $GLOBALS['Response']->addFeedback('error', $e->getMessage());
     }
 }
开发者ID:nickl-,项目名称:tuleap,代码行数:20,代码来源:GitActions.class.php

示例5: remove_pair

 public function remove_pair()
 {
     $this->account_manager->removePair($this->request->getCurrentUser());
     $this->response->redirect('/account/');
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:5,代码来源:LoginController.class.php


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