private function writeOptions(XMLWriter $writer, phpMorphy_Dict_Source_Interface $source) { $this->log(__METHOD__); $writer->startElement('options'); $this->writeDummy($writer); $writer->startElement('locale'); $writer->writeAttribute('name', $source->getLanguage()); $writer->endElement(); $writer->endElement(); }
protected function createNewDict(phpMorphy_Dict_Source_Interface $source) { $r = $this->engine->execInsert('dicts', array('name' => $this->trim($source->getName(), 64), 'desc' => $this->trim($source->getDescription(), 255), 'locale' => $this->trim($source->getLanguage(), 64))); $result = $this->engine->getLastInsertId('dicts'); return $result; }
function __construct(phpMorphy_Dict_Source_Interface $source) { $this->helper = phpMorphy_GramTab_Const_Factory::create($source->getLanguage()); foreach ($source->getAncodes() as $ancode) { $this->ancodes[] = $this->createAncode($ancode); } }