protected function createGramInfo(phpMorphy_Storage $storage, phpMorphy_FilesBundle $bundle) { //return new phpMorphy_GramInfo_RuntimeCaching(new phpMorphy_GramInfo_Proxy($storage)); //return new phpMorphy_GramInfo_RuntimeCaching(phpMorphy_GramInfo::create($storage, false)); return new phpMorphy_GramInfo_RuntimeCaching(new phpMorphy_GramInfo_Proxy_WithHeader($storage, $bundle->getGramInfoHeaderCacheFile())); }
protected function createGramInfo(phpMorphy_Storage $graminfoFile, phpMorphy_FilesBundle $bundle) { //return new phpMorphy_GramInfo_RuntimeCaching(new phpMorphy_GramInfo_Proxy($storage)); //return new phpMorphy_GramInfo_RuntimeCaching(phpMorphy_GramInfo::create($storage, false)); $result = new phpMorphy_GramInfo_RuntimeCaching(new phpMorphy_GramInfo_Proxy_WithHeader($graminfoFile, $bundle->getGramInfoHeaderCacheFile())); if ($this->options['use_ancodes_cache']) { return new phpMorphy_GramInfo_AncodeCache($result, $this->storage_factory->open($this->options['storage'], $bundle->getGramInfoAncodesCacheFile(), true)); } else { return $result; } }
protected function createGramInfo(phpMorphy_Storage_StorageInterface $graminfoFile, phpMorphy_FilesBundle $bundle) { $result = new phpMorphy_GramInfo_HeaderCache(new phpMorphy_GramInfo_RuntimeCache(new phpMorphy_GramInfo_Proxy($graminfoFile)), $bundle->getGramInfoHeaderCacheFile()); if ($this->options['use_ancodes_cache']) { $result = new phpMorphy_GramInfo_AncodeCache($result, $this->storage_factory->open($this->options['storage'], $bundle->getGramInfoAncodesCacheFile(), true)); } return $result; }