Esempio n. 1
0
 protected function createCommonSource(phpMorphy_FilesBundle $bundle, $opts)
 {
     $type = $opts['type'];
     switch ($type) {
         case PHPMORPHY_SOURCE_FSA:
             return new phpMorphy_Source_Fsa($this->common_fsa);
         case PHPMORPHY_SOURCE_DBA:
             return new phpMorphy_Source_Dba($bundle->getDbaFile($this->getDbaHandlerName(@$opts['opts']['handler'])), $opts['opts']);
         default:
             throw new phpMorphy_Exception("Unknown source type given '{$type}'");
     }
 }