share(function (PhraseaApplication $app) { return (new DownloadController($app)) ->setDispatcher($app['dispatcher']); }); } public function boot(Application $app) { // no-op } /** * {@inheritDoc} */ public function connect(Application $app) { $controllers = $this->createCollection($app); $controllers->before(new OAuthListener(['exit_not_present' => false])); $this->getFirewall($app)->addMandatoryAuthentication($controllers); $controllers->post('/', 'controller.prod.download:checkDownload') ->bind('check_download'); return $controllers; } }