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


PHP Request::getGetOrPostBoolean方法代碼示例

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


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

示例1: csv

 function csv(Request $request, Application $app)
 {
     $ourRequest = new \Request($request);
     $csv = new EventListCSVBuilder($app['currentSite'], $app['currentTimeZone']);
     $csv->getEventRepositoryBuilder()->setVenueVirtualOnly(true);
     $csv->setIncludeEventMedias($ourRequest->getGetOrPostBoolean("includeMedias", false));
     $csv->build();
     return $csv->getResponse();
 }
開發者ID:radical-assembly,項目名稱:OpenACalendar-Web-Core,代碼行數:9,代碼來源:VenueVirtualController.php

示例2: jsonp

 function jsonp(Request $request, Application $app)
 {
     $ourRequest = new \Request($request);
     $jsonp = new EventListJSONPBuilder($app['currentSite'], $app['currentTimeZone']);
     $jsonp->setIncludeEventMedias($ourRequest->getGetOrPostBoolean("includeMedias", false));
     $jsonp->build();
     if (isset($_GET['callback'])) {
         $jsonp->setCallBackFunction($_GET['callback']);
     }
     return $jsonp->getResponse();
 }
開發者ID:radical-assembly,項目名稱:OpenACalendar-Web-Core,代碼行數:11,代碼來源:EventListController.php

示例3: csv

 function csv($slug, Request $request, Application $app)
 {
     $ourRequest = new \Request($request);
     if (!$this->build($slug, $request, $app)) {
         $app->abort(404, "curatedlist does not exist.");
     }
     $csv = new EventListCSVBuilder($app['currentSite'], $app['currentTimeZone']);
     $csv->getEventRepositoryBuilder()->setCuratedList($this->parameters['curatedlist']);
     $csv->setIncludeEventMedias($ourRequest->getGetOrPostBoolean("includeMedias", false));
     $csv->build();
     return $csv->getResponse();
 }
開發者ID:radical-assembly,項目名稱:OpenACalendar-Web-Core,代碼行數:12,代碼來源:CuratedListController.php

示例4: listJson

 public function listJson(Request $request, Application $app)
 {
     $grb = new GroupRepositoryBuilder();
     $grb->setSite($app['currentSite']);
     $ourRequest = new \Request($request);
     $grb->setIncludeDeleted($ourRequest->getGetOrPostBoolean('include_deleted', false));
     $out = array('groups' => array());
     foreach ($grb->fetchAll() as $group) {
         $out['groups'][] = array('slug' => $group->getSlug(), 'slugForURL' => $group->getSlugForUrl(), 'title' => $group->getTitle());
     }
     return json_encode($out);
 }
開發者ID:radical-assembly,項目名稱:OpenACalendar-Web-Core,代碼行數:12,代碼來源:GroupListController.php

示例5: listJson

 public function listJson(Request $request, Application $app)
 {
     $erb = new EventRepositoryBuilder();
     $erb->setSite($app['currentSite']);
     $ourRequest = new \Request($request);
     $erb->setIncludeDeleted($ourRequest->getGetOrPostBoolean('include_deleted', false));
     $out = array('events' => array());
     foreach ($erb->fetchAll() as $event) {
         $out['events'][] = array('slug' => $event->getSlug(), 'slugForURL' => $event->getSlugForUrl(), 'summary' => $event->getSummary(), 'summaryDisplay' => $event->getSummaryDisplay());
     }
     return json_encode($out);
 }
開發者ID:radical-assembly,項目名稱:OpenACalendar-Web-Core,代碼行數:12,代碼來源:EventListController.php

示例6: jsonp

 function jsonp($slug, Request $request, Application $app)
 {
     $ourRequest = new \Request($request);
     if (!$this->build($slug, $request, $app)) {
         $app->abort(404, "Group does not exist.");
     }
     $jsonp = new EventListJSONPBuilder($app['currentSite'], $app['currentTimeZone']);
     $jsonp->getEventRepositoryBuilder()->setGroup($this->parameters['group']);
     $jsonp->setIncludeEventMedias($ourRequest->getGetOrPostBoolean("includeMedias", false));
     $jsonp->build();
     if (isset($_GET['callback'])) {
         $jsonp->setCallBackFunction($_GET['callback']);
     }
     return $jsonp->getResponse();
 }
開發者ID:radical-assembly,項目名稱:OpenACalendar-Web-Core,代碼行數:15,代碼來源:GroupController.php

示例7: jsonp

 function jsonp($slug, Request $request, Application $app)
 {
     if (!$this->build($slug, $request, $app)) {
         $app->abort(404, "Event does not exist.");
     }
     $eventMedias = array();
     $ourRequest = new \Request($request);
     if ($ourRequest->getGetOrPostBoolean("includeMedias", false)) {
         $mrb = new MediaRepositoryBuilder();
         $mrb->setEvent($this->parameters['event']);
         $mrb->setIncludeDeleted(false);
         $eventMedias = $mrb->fetchAll();
     }
     $jsonp = new EventListJSONPBuilder($app['currentSite'], $app['currentTimeZone']);
     $jsonp->addEvent($this->parameters['event'], $this->parameters['groups'], $this->parameters['venue'], $this->parameters['area'], $this->parameters['country'], $eventMedias);
     if (isset($_GET['callback'])) {
         $jsonp->setCallBackFunction($_GET['callback']);
     }
     return $jsonp->getResponse();
 }
開發者ID:radical-assembly,項目名稱:OpenACalendar-Web-Core,代碼行數:20,代碼來源:EventController.php


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