$action($request); if(!$response instanceof \Wpae\Http\Response) { throw new \Exception('The controller must return an HttpResponse instance.'); } $response->render(); } }