コード例 #1
0
ファイル: sql.php プロジェクト: Sywooch/dump
 protected function loadGrammems(phpMorphy_Dict_Source_Normalized_Ancodes $source, $context, $dictId)
 {
     $stmt = $this->engine->prepareInsert('grammems', array('dict_id', 'grammem'));
     $map = $context->getGrammemsMap();
     foreach ($source->getGrammems() as $grammem) {
         $stmt->execute(array($dictId, $this->trim($grammem->getName(), 16)));
         $map->register($grammem->getId(), $this->engine->getLastInsertId('grammems'));
     }
 }