public function categorize($cat) { if ($this->isNewRecord) { if ($cat == Illust::ILLUST) { $this->Illust_cat_title = Illust::ILLUST_CAT_TITLE; $this->illust_category_enum = Illust::ILLUST; return; } if ($cat == Illust::MANGA) { $this->Illust_cat_title = Illust::MANGA_CAT_TITLE; $this->illust_category_enum = Illust::MANGA; return; } ExceptionHelper::throw404(get_class($this), "categorize", "cannot categorize for " . $cat); } }
public function categorize($cat) { if ($this->isNewRecord) { if ($cat == GroupProduct::BOOK) { $this->GroupProduct_cat_title = GroupProduct::BOOK_CAT_TITLE; $this->product_catagory_enum = GroupProduct::BOOK; return; } if ($cat == GroupProduct::GIFT) { $this->GroupProduct_cat_title = GroupProduct::GIFT_CAT_TITLE; $this->product_catagory_enum = GroupProduct::GIFT; return; } if ($cat == GroupProduct::ELECT) { $this->GroupProduct_cat_title = GroupProduct::ELECT_CAT_TITLE; $this->product_catagory_enum = GroupProduct::ELECT; return; } ExceptionHelper::throw404(get_class($this), "categorize", "cannot categorize for " . $cat); } }