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')); } }