public function getListItems() { if ($this->childCategories) { return $this->childCategories; } else { if ($this->features) { return $this->features; } } // no data in memory, check db $this->childCategories = MapDB::childrenForCategory($this->id); if ($this->childCategories) { return $this->childCategories; } $this->features = MapDB::featuresForCategory($this->id); if ($this->features) { return $this->features; } return array(); }
public function getAllPlacemarks() { return MapDB::featuresForCategory($this->categoryId); }