public function getCategory() { if (!$this->category) { $this->category = MapDB::categoryForId($this->categoryId); } return $this->category; }