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