function __construct(phpMorphy_Dict_Source_SourceInterface $source) { $this->helper = phpMorphy_Dict_GramTab_ConstStorage_Factory::create($source->getLanguage()); foreach ($source->getAncodes() as $ancode) { $this->ancodes[] = $this->createAncode($ancode); } }
/** * @param string $outputFile * @return void */ static function generatePhp($outputFile) { $tpl = new phpMorphy_Generator_Template(__DIR__ . '/GramTab/tpl/php'); $consts = phpMorphy_Dict_GramTab_ConstStorage_Factory::getAllHelpers(); $helper = new phpMorphy_Generator_GramTab_HelperPhp(); $content = $tpl->get('gramtab', array('helper' => $helper, 'all_constants' => $consts)); @mkdir(dirname($outputFile), 0744, true); file_put_contents($outputFile, $content); }
/** * @return string|int */ protected function getPartOfSpeechForDeletedWordForm() { if (null === $this->part_of_speech_for_deleted) { $helper = phpMorphy_Dict_GramTab_ConstStorage_Factory::getSpecials(); $this->part_of_speech_for_deleted = $helper->getDeletedTagName(); } return $this->part_of_speech_for_deleted; }