public function getSubcategory($subcategoryId) { if ($this->hasSubcategory($subcategoryId)) { return $this->subcategories[$subcategoryId]; } }