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();
 }
 function jsonp($username, Request $request, Application $app)
 {
     if (!$this->build($username, $request, $app)) {
         $app->abort(404, "User does not exist.");
     }
     $jsonp = new EventListJSONPBuilder(null, $app['currentTimeZone']);
     $jsonp->getEventRepositoryBuilder()->setUserAccount($this->parameters['user'], false, false, true, false);
     $jsonp->build();
     if (isset($_GET['callback'])) {
         $jsonp->setCallBackFunction($_GET['callback']);
     }
     return $jsonp->getResponse();
 }
 function jsonp($slug, Request $request, Application $app)
 {
     $ourRequest = new \Request($request);
     if (!$this->build($slug, $request, $app)) {
         $app->abort(404, "curatedlist does not exist.");
     }
     $jsonp = new EventListJSONPBuilder($app['currentSite'], $app['currentTimeZone']);
     $jsonp->getEventRepositoryBuilder()->setCuratedList($this->parameters['curatedlist']);
     $jsonp->setIncludeEventMedias($ourRequest->getGetOrPostBoolean("includeMedias", false));
     $jsonp->build();
     if (isset($_GET['callback'])) {
         $jsonp->setCallBackFunction($_GET['callback']);
     }
     return $jsonp->getResponse();
 }
 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();
 }