public function getCategory() { if (!$this->category) { $categoryManager = new CategoryManager($this->db); $this->category = $categoryManager->findByid($this->id_category); } return $this->category; }