本文整理汇总了PHP中sfWebRequest::getparameter方法的典型用法代码示例。如果您正苦于以下问题:PHP sfWebRequest::getparameter方法的具体用法?PHP sfWebRequest::getparameter怎么用?PHP sfWebRequest::getparameter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sfWebRequest
的用法示例。
在下文中一共展示了sfWebRequest::getparameter方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: executeLoginInfo
public function executeLoginInfo(sfWebRequest $request)
{
if (!$this->getUser()->isAtLeast(Users::MANAGER)) {
if ($this->getUser()->getId() != $request->getParameter('user_ref')) {
$this->forwardToSecureAction();
}
}
$this->forward404Unless($this->user = Doctrine::getTable('Users')->find($request->getparameter('user_ref')), sprintf('User does not exist (%s).', $request->getParameter('user_ref')));
$this->loginInfo = Doctrine::getTable('UsersLoginInfos')->find($request->getParameter('id'));
if (!$this->loginInfo) {
$this->loginInfo = new UsersLoginInfos();
$this->loginInfo->setUserRef($request->getParameter('user_ref'));
}
if (!$this->getUser()->isAtLeast(Users::MANAGER) && $this->loginInfo->getLoginType() != 'local') {
$this->forwardToSecureAction();
}
$this->form = new UsersLoginInfosForm($this->loginInfo);
if ($request->isMethod('post')) {
$this->form->bind($request->getParameter('users_login_infos'));
if ($request->getParameter('user_ref') != $this->form->getValue('user_ref') && !$this->getUser()->isA(Users::ADMIN)) {
$this->forwardToSecureAction();
}
if ($this->form->isValid()) {
try {
$this->form->save();
} catch (Exception $e) {
return $this->renderText($e->getMessage());
}
return $this->renderText('ok');
}
}
}
示例2: executeAjaxRegist
public function executeAjaxRegist(sfWebRequest $request)
{
$this->nickname = $this->getUser()->getMember()->getName();
$y = $request->getParameter('y');
if (empty($y)) {
$y = date('Y');
}
$m = $request->getParameter('m');
if (empty($m)) {
$m = date('m');
}
$d = $request->getParameter('d');
if (empty($d)) {
$d = date('d');
}
$this->data = $request->getParameter('keitai') . $request->getParameter('sh') . $request->getparameter('sm') . $request->getparameter('eh') . $request->getParameter('em');
$this->rest = $request->getParameter('rest');
$this->comment = $request->getParameter('comment');
$this->y = $y;
$this->m = $m;
$this->d = $d;
$this->setLayout(false);
return sfView::SUCCESS;
}