当前位置: 首页>>代码示例>>PHP>>正文


PHP HTTPRequest::getData方法代码示例

本文整理汇总了PHP中HTTPRequest::getData方法的典型用法代码示例。如果您正苦于以下问题:PHP HTTPRequest::getData方法的具体用法?PHP HTTPRequest::getData怎么用?PHP HTTPRequest::getData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HTTPRequest的用法示例。


在下文中一共展示了HTTPRequest::getData方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: executeIndex

 public function executeIndex(HTTPRequest $request)
 {
     if (!$this->app->user()->isAuthenticated()) {
         $this->app->httpResponse()->redirect404();
         exit;
     }
     if (Config::get('platform-fee-ratio') == 0) {
         $this->app->httpResponse()->redirect404();
         exit;
     }
     $reservationId = htmlspecialchars($request->getData('reservationId'));
     $reservation = $this->_announcementReservationManager->get($reservationId);
     if (is_null($reservation)) {
         $this->app->httpResponse()->redirect404();
         exit;
     }
     $userId = $this->app->user()->getAttribute('id');
     if ($userId != $reservation->getUserSubscriberId() || $reservation->getStateId() != PaiementStates::WAITING_PAIEMENT) {
         $this->app->httpResponse()->redirect404();
         exit;
     }
     $this->page->smarty()->assign('announcementReservationManager', $this->_announcementReservationManager);
     $this->page->smarty()->assign('usersManager', $this->_usersManager);
     $this->page->smarty()->assign('reservation', $reservation);
     $this->page->smarty()->assign('amount', round($reservation->getPrice() * Tipkin\Config::get('platform-fee-ratio'), 2));
 }
开发者ID:Tipkin-Commons,项目名称:tipkin,代码行数:26,代码来源:PaiementController.class.php

示例3: executeAnnounceList

 public function executeAnnounceList(HTTPRequest $request)
 {
     $announceId = htmlspecialchars($request->getData('announceId'));
     $listOfFeedbacks = $this->_feedbacksManager->getByAnnounceId($announceId);
     $this->page->smarty()->assign('listOfFeedbacks', $listOfFeedbacks);
     $this->page->smarty()->assign('profilesManager', $this->_profilesManager);
     $this->page->smarty()->assign('usersManager', $this->_usersManager);
 }
开发者ID:Tipkin-Commons,项目名称:tipkin,代码行数:8,代码来源:FeedbackController.class.php

示例4: executeDelete

 public function executeDelete(HTTPRequest $request)
 {
     $id = $request->getData('carrouselId');
     $carrousel = $this->_carrouselsManager->get($id);
     $announceId = $carrousel->getAnnounceId();
     $this->_carrouselsManager->delete($id);
     $this->app->httpResponse()->redirect('/view/member/announce-' . $announceId);
     exit;
 }
开发者ID:Tipkin-Commons,项目名称:tipkin,代码行数:9,代码来源:CarrouselController.class.php

示例5: executeCancel

 public function executeCancel(HTTPRequest $request)
 {
     $reservationid = $request->getData('reservationId');
     $reservation = $this->_reservationsManager->get($reservationid);
     if ($this->app->httpRequest()->postExists('submit-form')) {
         $reservation->setStateId(PaiementStates::CANCELED);
         $reservation->setUpdatedTime(time());
         $this->_reservationsManager->save($reservation);
         $this->app->httpResponse()->redirect('/admin/history');
         exit;
     }
     $this->page->smarty()->assign('reservation', $reservation);
 }
开发者ID:Tipkin-Commons,项目名称:tipkin,代码行数:13,代码来源:HistoryController.class.php

示例6: executeRefuse

 public function executeRefuse(HTTPRequest $request)
 {
     $announce = $this->_announcementsManager->get($request->getData('announceId'));
     $this->page->smarty()->assign('announce', $announce);
     if ($request->postExists('confirm')) {
         $announce->setStateId(AnnouncementStates::STATE_REFUSED);
         $announce->setAdminComment(htmlspecialchars($request->postData('admin-comment')));
         $this->_announcementsManager->save($announce);
         $this->app->user()->setFlash('announce-refused');
         //TODO : Envoyer un mail à l'utilistateur
         $this->app->httpResponse()->redirect('/admin/announcements');
         exit;
     }
 }
开发者ID:Tipkin-Commons,项目名称:tipkin,代码行数:14,代码来源:AnnouncementsController.class.php

示例7: executePublish

 public function executePublish(HTTPRequest $request)
 {
     $opinionId = $request->getData('opinionId');
     $opinion = $this->_opinionsManager->get($opinionId);
     if ($request->postExists('submit-form')) {
         $opinion->setIsPublished(true);
         $this->_opinionsManager->save($opinion);
         $this->app->user()->setFlash('opinion-published');
         $this->app->httpResponse()->redirect('/admin/opinion');
         exit;
     }
     $this->page->smarty()->assign('opinion', $opinion);
     $this->page->smarty()->assign('opinionsManager', $this->_opinionsManager);
     $this->page->smarty()->assign('usersManager', $this->_usersManager);
 }
开发者ID:Tipkin-Commons,项目名称:tipkin,代码行数:15,代码来源:OpinionController.class.php

示例8: executeDeleteFeedback

 public function executeDeleteFeedback(HTTPRequest $request)
 {
     $feedbackId = htmlspecialchars($request->getData('feedbackId'));
     $feedback = $this->_feedbacksManager->get($feedbackId);
     if ($request->postExists('submit-form')) {
         $this->_moderatesManager->deleteByFeedbackId($feedbackId);
         $this->_feedbacksManager->delete($feedbackId);
         $this->app->user()->setFlash('feedback-deleted');
         $this->app->httpResponse()->redirect('/admin/moderate');
         exit;
     }
     $this->page->smarty()->assign('feedback', $feedback);
     $this->page->smarty()->assign('feedbacksManager', $this->_feedbacksManager);
     $this->page->smarty()->assign('profilesManager', $this->_profilesManager);
     $this->page->smarty()->assign('usersManager', $this->_usersManager);
 }
开发者ID:Tipkin-Commons,项目名称:tipkin,代码行数:16,代码来源:ModerateController.class.php

示例9: executeDelete

 public function executeDelete(HTTPRequest $request)
 {
     $category = $this->_categoriesManager->get($request->getData('categoryId'));
     if ($request->postExists('submit-form')) {
         $this->_categoriesManager->deleteByParentCategoryId($category->id());
         $this->_categoriesManager->delete($category->id());
         $this->app->user()->setFlash('category-deleted');
         $this->app->httpResponse()->redirect('/admin/categories');
         exit;
     }
     if ($category->getIsRoot()) {
         $categoryType = 'category';
     } else {
         $categoryType = 'sub-category';
     }
     $this->page->smarty()->assign('category', $category);
     $this->page->smarty()->assign('categoriesManager', $this->_categoriesManager);
 }
开发者ID:Tipkin-Commons,项目名称:tipkin,代码行数:18,代码来源:CategoriesController.class.php

示例10: executeFeedback

 public function executeFeedback(HTTPRequest $request)
 {
     $feedback = $this->_feedbacksManager->get(htmlspecialchars($request->getData('feedbackId')));
     if ($request->postExists('submit-form')) {
         $moderate = new Moderate();
         $moderate->setType(Moderate::TYPE_FEEDBACK);
         $moderate->setTypeId(htmlspecialchars($request->postData('feedback-id')));
         $moderate->setUserAuthorId(htmlspecialchars($request->postData('user-id')));
         $moderate->setMessage(htmlspecialchars($request->postData('message')));
         $this->_moderatesManager->save($moderate);
         //Envoyer un mail ici
         $messageMail = new Mail();
         $messageMail->sendModerationRequest();
         $this->page->smarty()->assign('messageSent', true);
         $this->app->user()->setFlash('message-sent');
         $this->displayInfoMessage();
     }
     $this->page->smarty()->assign('feedback', $feedback);
     $this->page->smarty()->assign('profilesManager', $this->_profilesManager);
     $this->page->smarty()->assign('usersManager', $this->_usersManager);
 }
开发者ID:Tipkin-Commons,项目名称:tipkin,代码行数:21,代码来源:ModerateController.class.php

示例11: executePro

 public function executePro(HTTPRequest $request)
 {
     if (!$this->app->user()->isAuthenticated()) {
         $this->app->httpResponse()->redirect404();
         exit;
     }
     $userId = htmlspecialchars($request->getData('userId'));
     $user = $this->_usersManager->get($userId);
     $profile = null;
     if (!is_null($user)) {
         $profile = $this->_profilesProManager->getByUserId($user->id());
     }
     if (is_null($profile)) {
         $this->app->httpResponse()->redirect404();
         exit;
     }
     $mainAddress = $this->_addressesManager->get($profile->getMainAddressId());
     $this->_listOfUserAnnonces = $this->_announcementsProManager->getListOf($user->id());
     $this->page->smarty()->assign('user', $user);
     $this->page->smarty()->assign('profile', $profile);
     $this->page->smarty()->assign('mainAddress', $mainAddress);
     $this->page->smarty()->assign('listOfUserAnnonces', $this->_listOfUserAnnonces);
 }
开发者ID:Tipkin-Commons,项目名称:tipkin,代码行数:23,代码来源:ViewusersController.class.php

示例12: assignFilter

 private function assignFilter(HTTPRequest $request, AnnounceFilter $announceFilter)
 {
     $regionId = htmlspecialchars($request->getData('regionId'));
     $departmentId = htmlspecialchars($request->getData('departmentId'));
     $categoryId = htmlspecialchars($request->getData('categoryId'));
     $subCategoryId = htmlspecialchars($request->getData('subCategoryId'));
     $zipCode = htmlspecialchars($request->getData('zipCode'));
     $filterText = htmlspecialchars(urldecode($request->getData('filter')));
     $filterText = preg_replace('/(\\/|\\+)/', ' ', $filterText);
     //Supprime les espaces inutiles
     $filterText = preg_replace('/\\s\\s+/', ' ', $filterText);
     $announceFilter->setRegionId($regionId);
     $announceFilter->setDepartmentId($departmentId);
     $announceFilter->setCategoryId($categoryId);
     $announceFilter->setSubCategoryId($subCategoryId);
     $announceFilter->setZipCode($zipCode);
     $announceFilter->setFilterText($filterText);
     $inCommunity = htmlspecialchars($request->getData('community'));
     if (!empty($inCommunity)) {
         $inCommunity = $this->app->user()->getAttribute('id');
     }
     $announceFilter->setInCommunity($inCommunity);
     $this->page->smarty()->assign('filter', $announceFilter);
 }
开发者ID:Tipkin-Commons,项目名称:tipkin,代码行数:24,代码来源:SearchController.class.php

示例13: 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

示例14: executeUnarchive

 public function executeUnarchive(HTTPRequest $request)
 {
     $announceId = $request->getData('announceId');
     $announce = $this->_announcementsProManager->get($announceId);
     $this->page->smarty()->assign('announce', $announce);
     if ($request->postExists('confirm')) {
         $announce->setStateId(AnnouncementStates::STATE_VALIDATED);
         $currentDate = new DateTime();
         $announce->setPublicationDate($currentDate->format('Y-m-d'));
         $this->_announcementsProManager->save($announce);
         $this->app->httpResponse()->redirect('/announcements-pro' . '/validated');
         exit;
     }
 }
开发者ID:Tipkin-Commons,项目名称:tipkin,代码行数:14,代码来源:AnnouncementsproController.class.php

示例15: executePro

 public function executePro(HTTPRequest $request)
 {
     $announceId = htmlspecialchars($request->getData('announceId'));
     $announce = $this->_announcementsProManager->get($announceId);
     if (!$this->announceIsValid($announce)) {
         $this->app->httpResponse()->redirect404();
         exit;
     }
     $profile = $this->_profilesProManager->getByUserId($announce->getUserId());
     $user = $this->_usersManager->get($announce->getUserId());
     $mainAddress = $this->_addressesManager->get($profile->getMainAddressId());
     $this->_listOfUserAnnonces = $this->_announcementsProManager->getListOf($announce->getUserId());
     $this->page->smarty()->assign('announce', $announce);
     $this->page->smarty()->assign('profile', $profile);
     $this->page->smarty()->assign('user', $user);
     $this->page->smarty()->assign('categories', $this->_listOfCategories);
     $this->page->smarty()->assign('mainAddress', $mainAddress);
     $this->page->smarty()->assign('listOfUserAnnonces', $this->_listOfUserAnnonces);
     $this->page->smarty()->assign('usersManager', $this->_usersManager);
     $this->page->smarty()->assign('departmentsManager', $this->_departmentsManager);
 }
开发者ID:Tipkin-Commons,项目名称:tipkin,代码行数:21,代码来源:ViewadsController.class.php


注:本文中的HTTPRequest::getData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。