categoryDao->getCategoryById($categoryId); if ($category === null) { throw new PageNotFoundException(); } else { $this->sendJson($category); } } function getDoCategories(): void { $categories = $this->categoryDao->getCategories(); $this->sendJson($categories); } function postDoCategory(ParamBody $body): void { } function putDoCategory(int $articleId, ParamBody $body): void { } function deleteDoCategory(int $articleId): void { } }