当前位置: 首页>>代码示例>>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;未经允许,请勿转载。