protectedfunctiongetIdByNumber($number, $type) { switch(strtolower($type)){ case self::TYPE_PRODUCT: return$this->getProductIdByNumber($number); case self::TYPE_VARIANT: return$this->getProductVariantIdByNumber($number); case self::TYPE_PRODUCT_LINK: $this->getLinkIdByNumber($number); // no break
case self::TYPE_PRODUCT_DOWNLOAD: $this->getDownloadIdByNumber($number); // no break
case self::TYPE_PRODUCT_MANUFACTURER: return$this->getManufacturerIdByNumber($number); case self::TYPE_COUNTRY: return$this->getCountryIdByNumber($number); case self::TYPE_COUNTRY_STATE: