userId = (int)$this->getUrlParamInt('userId'); } public function handle(): void { $user = new User($this->userId); $this->response = new ApiJsonResponse(); $this->response->setResult($user); } }