當前位置: 首頁>>代碼示例>>PHP>>正文


PHP sfWebRequest::getparameter方法代碼示例

本文整理匯總了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');
         }
     }
 }
開發者ID:naturalsciences,項目名稱:Darwin,代碼行數:32,代碼來源:actions.class.php

示例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;
 }
開發者ID:nishizoe,項目名稱:opGyoenKintaiPlugin,代碼行數:24,代碼來源:actions.class.php


注:本文中的sfWebRequest::getparameter方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。