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


PHP HTTPRequest::getExists方法代碼示例

本文整理匯總了PHP中HTTPRequest::getExists方法的典型用法代碼示例。如果您正苦於以下問題:PHP HTTPRequest::getExists方法的具體用法?PHP HTTPRequest::getExists怎麽用?PHP HTTPRequest::getExists使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在HTTPRequest的用法示例。


在下文中一共展示了HTTPRequest::getExists方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 public function __construct($path = NULL)
 {
     $this->FS = new FS();
     $this->httpResponse = new HTTPResponse();
     $this->httpRequest = new HTTPRequest();
     $this->path = isset($path) ? $path : ($this->httpRequest->getExists('path') ? $this->httpRequest->getData('path') : NULL);
 }
開發者ID:na2axl,項目名稱:FlatOS,代碼行數:7,代碼來源:RawData.php

示例2: executeLeave

 public function executeLeave(HTTPRequest $request)
 {
     $this->authenticationRedirection();
     if (!$request->getExists('feedbackRequestId')) {
         $this->app->httpResponse()->redirect404();
         exit;
     }
     $feedbackRequestId = htmlspecialchars($request->getData('feedbackRequestId'));
     $feedbackRequest = $this->_feedbackRequestsManager->get($feedbackRequestId);
     if (is_null($feedbackRequest)) {
         $this->app->httpResponse()->redirect404();
         exit;
     }
     if ($request->postExists('submit-form')) {
         $feedback = new Feedback();
         $feedback->setAnnounceId($feedbackRequest->getAnnounceId());
         $feedback->setUserAuthorId($feedbackRequest->getUserAuthorId());
         $feedback->setUserOwnerId($feedbackRequest->getUserOwnerId());
         $feedback->setUserSubscriberId($feedbackRequest->getUserSubscriberId());
         $feedback->setReservationId($feedbackRequest->getReservationId());
         $mark = htmlspecialchars($request->postData('mark'));
         $comment = htmlspecialchars($request->postData('comment'));
         $feedback->setMark($mark);
         $feedback->setComment($comment);
         $this->_feedbacksManager->save($feedback);
         $this->_feedbackRequestsManager->delete($feedbackRequest->id());
         $this->app->user()->setFlash('feedback-saved');
         $this->app->httpResponse()->redirect('/feedback');
         exit;
     }
     $this->page->smarty()->assign('feedbackRequest', $feedbackRequest);
 }
開發者ID:Tipkin-Commons,項目名稱:tipkin,代碼行數:32,代碼來源:FeedbackController.class.php

示例3: executeIndex

 public function executeIndex(HTTPRequest $request)
 {
     $announces = $this->_announcementsManager->getListOf($this->_user->id());
     $this->page->smarty()->assign('announces', $announces);
     $this->page->smarty()->assign('categoriesManager', $this->_categoriesManager);
     $this->_pageState = 'drafts';
     if ($request->getExists('state')) {
         switch ($request->getData('state')) {
             case 'drafts':
                 $this->_pageState = 'drafts';
                 break;
             case 'validated':
                 $this->_pageState = 'validated';
                 break;
             case 'archived':
                 $this->_pageState = 'archived';
                 break;
             case 'pending':
                 $this->_pageState = 'pending';
                 break;
             case 'refused':
                 $this->_pageState = 'refused';
                 break;
             default:
                 break;
         }
     }
     $this->page->smarty()->assign('state', $this->_pageState);
 }
開發者ID:Tipkin-Commons,項目名稱:tipkin,代碼行數:29,代碼來源:AnnouncementsController.class.php

示例4: executeIndex

 public function executeIndex(HTTPRequest $request)
 {
     if ($request->getExists('contactGroup')) {
         $contactGroup = $request->getData('contactGroup');
         $this->page->smarty()->assign('contactGroup', $contactGroup);
     }
     $contacts = $this->_contactsManager->getListOf($this->_user->id());
     $this->page->smarty()->assign('contacts', $contacts);
     $contactRequests = $this->_contactRequestsManager->getListOfTo($this->_user->id());
     $this->page->smarty()->assign('contactRequests', $contactRequests);
     $this->page->smarty()->assign('profilesManager', $this->_profilesManager);
     $this->page->smarty()->assign('usersManager', $this->_usersManager);
     $this->page->smarty()->assign('addressesManager', $this->_addressesManager);
 }
開發者ID:Tipkin-Commons,項目名稱:tipkin,代碼行數:14,代碼來源:ContactsController.class.php

示例5: executeIndex

 public function executeIndex(HTTPRequest $request)
 {
     if ($request->getExists('contactGroup')) {
         $contactGroup = $request->getData('contactGroup');
         $this->page->smarty()->assign('contactGroup', $contactGroup);
     }
     $contacts = $this->_contactsManager->getListOf($this->_user->id());
     $this->page->smarty()->assign('contacts', $contacts);
     $contactRequests = $this->_contactRequestsManager->getListOfTo($this->_user->id());
     $this->page->smarty()->assign('contactRequests', $contactRequests);
     $this->page->smarty()->assign('profilesManager', $this->_profilesManager);
     $this->page->smarty()->assign('usersManager', $this->_usersManager);
     $this->page->smarty()->assign('addressesManager', $this->_addressesManager);
     if (@$_POST['commentaire']) {
         $this->page->smarty()->assign('commentaire', $_POST['commentaire']);
     } else {
         $this->page->smarty()->assign('commentaire', '');
     }
     if (@$_POST['emails_liste']) {
         $this->page->smarty()->assign('emails_liste', $_POST['commentaire']);
     } else {
         $this->page->smarty()->assign('emails_liste', '');
     }
 }
開發者ID:Tipkin-Commons,項目名稱:tipkin,代碼行數:24,代碼來源:InviteController.class.php

示例6: reservationRedirect

 private function reservationRedirect(HTTPRequest $request)
 {
     if ($request->getExists('reservationId') && $request->getExists('keyCheck')) {
         $idReservation = htmlspecialchars($request->getData('reservationId'));
         $reservation = $this->_announcementReservationManager->get($idReservation);
         //Si notre lien de réservation a déjà été "consommé" on redirige vers une page de "Rebond"
         if (is_null($reservation->getKeyCheck())) {
             $this->app->httpResponse()->redirect('/reservations/rebound/' . $reservation->id());
             exit;
         } elseif ($reservation->getKeyCheck() != $request->getData('keyCheck')) {
             $this->app->httpResponse()->redirect404();
             exit;
         }
     } else {
         $this->app->httpResponse()->redirect404();
         exit;
     }
 }
開發者ID:Tipkin-Commons,項目名稱:tipkin,代碼行數:18,代碼來源:ActivitiesController.class.php

示例7: executeUsernameExists

 public function executeUsernameExists(HTTPRequest $request)
 {
     $this->init();
     if ($request->getExists('username')) {
         $username = htmlspecialchars($request->getData('username'));
         $isUsernameExists = $this->_userManager->isUsernameOrMailExist($username, $username);
         $this->page->smarty()->assign('usernameExists', $isUsernameExists);
     } else {
         $this->app->httpResponse()->redirect404();
         exit;
     }
 }
開發者ID:Tipkin-Commons,項目名稱:tipkin,代碼行數:12,代碼來源:ConnexionController.class.php


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