function __construct(phpMorphy_GramInfo_GramInfoInterface $inner, $resource) { parent::__construct($inner); if (false === ($this->cache = unserialize($resource->read(0, $resource->getFileSize())))) { throw new phpMorphy_Exception("Can`t read ancodes cache"); } }
/** * @param phpMorphy_GramInfo_GramInfoInterface $object * @param string $cacheFilePath * */ function __construct(phpMorphy_GramInfo_GramInfoInterface $object, $cacheFilePath) { parent::__construct($object); $this->cache = $this->readCache($cacheFilePath); $this->ends = str_repeat("", $this->getCharSize() + 1); }