当前位置: 首页>>代码示例>>PHP>>正文


PHP base::delete_data_from_cache方法代码示例

本文整理汇总了PHP中base::delete_data_from_cache方法的典型用法代码示例。如果您正苦于以下问题:PHP base::delete_data_from_cache方法的具体用法?PHP base::delete_data_from_cache怎么用?PHP base::delete_data_from_cache使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在base的用法示例。


在下文中一共展示了base::delete_data_from_cache方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: apply

 /**
  * {@inheritdoc}
  */
 public function apply(base $databox, Application $app)
 {
     $sql = 'TRUNCATE metadatas';
     $stmt = $databox->get_connection()->prepare($sql);
     $stmt->execute();
     $stmt->closeCursor();
     $sql = 'TRUNCATE metadatas_structure';
     $stmt = $databox->get_connection()->prepare($sql);
     $stmt->execute();
     $stmt->closeCursor();
     $sql = 'TRUNCATE technical_datas';
     $stmt = $databox->get_connection()->prepare($sql);
     $stmt->execute();
     $stmt->closeCursor();
     $phrasea_maps = ['pdftext' => 'Phraseanet:pdftext', 'tf-archivedate' => 'Phraseanet:tf-archivedate', 'tf-atime' => 'Phraseanet:tf-atime', 'tf-chgdocdate' => 'Phraseanet:tf-chgdocdate', 'tf-ctime' => 'Phraseanet:tf-ctime', 'tf-editdate' => 'Phraseanet:tf-editdate', 'tf-mtime' => 'Phraseanet:tf-mtime', 'tf-parentdir' => 'Phraseanet:tf-parentdir', 'tf-bits' => 'Phraseanet:tf-bits', 'tf-channels' => 'Phraseanet:tf-channels', 'tf-extension' => 'Phraseanet:tf-extension', 'tf-filename' => 'Phraseanet:tf-filename', 'tf-filepath' => 'Phraseanet:tf-filepath', 'tf-height' => 'Phraseanet:tf-height', 'tf-mimetype' => 'Phraseanet:tf-mimetype', 'tf-recordid' => 'Phraseanet:tf-recordid', 'tf-size' => 'Phraseanet:tf-size', 'tf-width' => 'Phraseanet:tf-width'];
     $sxe = $databox->get_sxml_structure();
     $dom_struct = $databox->get_dom_structure();
     $xp_struct = $databox->get_xpath_structure();
     foreach ($sxe->description->children() as $fname => $field) {
         $src = trim(isset($field['src']) ? $field['src'] : '');
         if (array_key_exists($src, $phrasea_maps)) {
             $src = $phrasea_maps[$src];
         }
         $nodes = $xp_struct->query('/record/description/' . $fname);
         if ($nodes->length > 0) {
             $node = $nodes->item(0);
             $node->setAttribute('src', $src);
             $node->removeAttribute('meta_id');
         }
     }
     $databox->saveStructure($dom_struct);
     $databox->feed_meta_fields();
     $databox->delete_data_from_cache(databox::CACHE_STRUCTURE);
     $databox->delete_data_from_cache(databox::CACHE_META_STRUCT);
     $conn = $app->getApplicationBox()->get_connection();
     $sql = 'DELETE FROM `task2` WHERE class="readmeta"';
     $stmt = $conn->prepare($sql);
     $stmt->execute();
     $stmt->closeCursor();
     unset($stmt);
     return true;
 }
开发者ID:luisbrito,项目名称:Phraseanet,代码行数:45,代码来源:320alpha4a.php

示例2: delete_data_from_cache

 public function delete_data_from_cache($option = null)
 {
     switch ($option) {
         case self::CACHE_CGUS:
             $this->cgus = null;
             break;
         case self::CACHE_META_STRUCT:
             $this->meta_struct = null;
             break;
         case self::CACHE_STRUCTURE:
             $this->_dom_structure = $this->_xpath_structure = $this->structure = $this->_sxml_structure = null;
             break;
         case self::CACHE_THESAURUS:
             $this->thesaurus = null;
             break;
         default:
             break;
     }
     parent::delete_data_from_cache($option);
 }
开发者ID:romainneutron,项目名称:Phraseanet,代码行数:20,代码来源:databox.php

示例3: delete_data_from_cache

 public function delete_data_from_cache($option = null)
 {
     if ($option === appbox::CACHE_LIST_BASES) {
         $this->databoxes = null;
     }
     parent::delete_data_from_cache($option);
 }
开发者ID:romainneutron,项目名称:Phraseanet,代码行数:7,代码来源:appbox.php


注:本文中的base::delete_data_from_cache方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。