Exemplo n.º 1
0
 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");
     }
 }
Exemplo n.º 2
0
 /**
  * @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);
 }