public function codeDigest($content)
 {
     $formula = $this->getAndCheckFolder(com_wiris_plugin_api_ConfigurationKeys::$FORMULA_FOLDER);
     $digest = com_wiris_system_Md5Tools::encodeString($content);
     $store = com_wiris_util_sys_Store::newStoreWithParent(com_wiris_util_sys_Store::newStore($formula), $digest . ".ini");
     $store->write($content);
     return $digest;
 }
 public function decodeDigest($digest)
 {
     $formula = $this->getAndCheckFolder(com_wiris_plugin_api_ConfigurationKeys::$FORMULA_FOLDER);
     $store = $this->getFileStore($formula, $digest, "ini");
     if (com_wiris_plugin_impl_FolderTreeStorageAndCache::$backwards_compat) {
         if (!$store->exists()) {
             $oldstore = com_wiris_util_sys_Store::newStore($formula . "/" . $digest . ".ini");
             $parent = $store->getParent();
             $parent->mkdirs();
             $oldstore->moveTo($store);
         }
     }
     return $store->read();
 }
示例#3
0
 static function newStoreWithParent($store, $str)
 {
     return com_wiris_util_sys_Store::newStore($store->getFile() . "/" . $str);
 }