reflector->hasAnnotationOrAttribute('UseSession', UseSession::class)) { $this->session->reopen(); } } /** * @param Controller $controller * @param string $methodName * @param Response $response * @return Response */ public function afterController($controller, $methodName, Response $response) { if ($this->reflector->hasAnnotationOrAttribute('UseSession', UseSession::class)) { $this->session->close(); } return $response; } }