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(); }