protected function initOldStyle(phpMorphy_FilesBundle $bundle, $options) { $options = $this->repairOptions($options); switch ($bundle->getLang()) { case 'rus': $bundle->setLang('ru_RU'); break; case 'eng': $bundle->setLang('en_EN'); break; case 'ger': $bundle->setLang('de_DE'); break; } $this->initNewStyle($bundle, $options); }
protected function initOldStyle(phpMorphy_FilesBundle $bundle, $options) { $options = $this->repairOptions($options); switch ($bundle->getLang()) { case 'rus': $bundle->setLang('ru_RU'); break; case 'eng': $bundle->setLang('en_EN'); break; case 'ger': $bundle->setLang('de_DE'); break; default: $lang = $bundle->getLang(); throw new phpMorphy_Exception("Invalid lang '{$lang}', valid values are [rus, eng, ger]"); } $this->initNewStyle($bundle, $options); }