本文整理汇总了PHP中Layout::addFeedback方法的典型用法代码示例。如果您正苦于以下问题:PHP Layout::addFeedback方法的具体用法?PHP Layout::addFeedback怎么用?PHP Layout::addFeedback使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Layout
的用法示例。
在下文中一共展示了Layout::addFeedback方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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() . '/');
}
}
示例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('/');
}
}
示例3: finish_login
public function finish_login()
{
try {
$return_url = get_server_url() . '/my';
if ($this->request->existAndNonEmpty('return_to')) {
$return_url = $this->request->getValidated('return_to', 'string', '');
}
$driver = new Openid_Driver_ConnexionDriver($this->logger, '?func=' . OpenId_OpenIdRouter::FINISH_LOGIN);
$connexion_manager = new Openid_ConnexionManager($driver);
$identity_url = $connexion_manager->finishAuthentication($return_url);
$this->account_manager->authenticateCorrespondingUser($identity_url);
$this->response->redirect($return_url);
} catch (OpenId_OpenIdException $exception) {
$this->response->addFeedback(Feedback::ERROR, $exception->getMessage());
}
$this->response->redirect('/account/login');
}