/** * Get application information * * @param Application $app A Silex application where the controller is mounted on * @param Request $request The current request * @param integer $id The application id * @return Response */ public function getApp(Application $app, Request $request, $id) { try { $client = new \API_OAuth2_Application($app, $id); } catch (NotFoundHttpException $e) { $app->abort(404); } $token = $client->get_user_account($app['authentication']->getUser())->get_token()->get_value(); return $app['twig']->render('developers/application.html.twig', ["application" => $client, "user" => $app['authentication']->getUser(), "token" => $token]); }