container = $container; $this->response = $response; $this->request = $request; } public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { $params = $this->request->all(); /** * @var AppService $appService */ $appService = $this->container->make(AppService::class); $app = $appService->checkSign($params); Context::set('app', $app); return $handler->handle($request); } }