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