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


PHP Key::drop方法代码示例

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


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

示例1: delete

 public function delete()
 {
     if (!$this->id) {
         return;
     }
     $db = new PHPWS_DB('signup_sheet');
     $db->addWhere('id', $this->id);
     PHPWS_Error::logIfError($db->delete());
     Key::drop($this->key_id);
     $db = new PHPWS_DB('signup_slots');
     $db->addWhere('sheet_id', $this->id);
     PHPWS_Error::logIfError($db->delete());
     $db = new PHPWS_DB('signup_peeps');
     $db->addWhere('sheet_id', $this->id);
     PHPWS_Error::logIfError($db->delete());
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:16,代码来源:Sheet.php

示例2: delete

 /**
  * Fully deletes this form and it's elements
  *
  * @access public
  */
 function delete()
 {
     if (is_array($this->_elements)) {
         foreach ($this->_elements as $value) {
             $elementInfo = explode(':', $value);
             $this->element = new $elementInfo[0]($elementInfo[1]);
             $this->element->kill();
         }
     }
     /* If the form is saved archive all data in it's table and remove the table. */
     if ($this->isSaved()) {
         $this->report = new PHAT_Report();
         PHPWS_DB::dropTable('mod_phatform_form_' . $this->getId());
     }
     Key::drop($this->_key_id);
     $this->kill();
     $_SESSION['PHAT_FormManager']->form = null;
     $_SESSION['PHAT_FormManager']->_list();
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:24,代码来源:Form.php

示例3: delete

 public function delete()
 {
     $db = new PHPWS_DB('ps_page');
     $db->addWhere('id', $this->id);
     $result = $db->delete();
     if (PHPWS_Error::logIfError($result)) {
         return false;
     }
     Key::drop($this->key_id);
     $db = new PHPWS_DB('ps_text');
     $db->addWhere('pid', $this->id);
     $db->delete();
     $db = new PHPWS_DB('ps_block');
     $db->addWhere('pid', $this->id);
     $db->delete();
     if ($this->parent_page) {
         $db = new PHPWS_DB('ps_page');
         $db->addWhere('parent_page', $this->parent_page);
         $db->addWhere('page_order', $this->page_order, '>');
         PHPWS_Error::logIfError($db->reduceColumn('page_order'));
     }
     $this->removeShortcuts();
     return true;
 }
开发者ID:par-orillonsoft,项目名称:phpwebsite,代码行数:24,代码来源:PS_Page.php

示例4: delete

 public function delete($permanent = false)
 {
     $db = new PHPWS_DB('ps_page');
     $db->addWhere('id', $this->id);
     if ($permanent) {
         $result = $db->delete();
         if (PHPWS_Error::logIfError($result)) {
             return false;
         }
         Key::drop($this->key_id);
         $db = new PHPWS_DB('ps_text');
         $db->addWhere('pid', $this->id);
         $result = $db->delete();
         $db = new PHPWS_DB('ps_block');
         $db->addWhere('pid', $this->id);
         $db->delete();
     } else {
         $db->addValue('deleted', 1);
         $db->addValue('last_updated', time());
         $result = $db->update();
         if (PHPWS_Error::logIfError($result)) {
             return false;
         }
         $key = new \Key($this->key_id);
         $key->active = 0;
         $key->save();
         $key->unregister();
     }
     $this->removeShortcuts();
     if ($this->parent_page) {
         $db = new PHPWS_DB('ps_page');
         $db->addWhere('parent_page', $this->parent_page);
         $db->addWhere('page_order', $this->page_order, '>');
         PHPWS_Error::logIfError($db->reduceColumn('page_order'));
     }
     return true;
 }
开发者ID:sysulsj,项目名称:phpwebsite,代码行数:37,代码来源:PS_Page.php

示例5: delete

 public function delete()
 {
     $table = $this->_schedule->getEventTable();
     Key::drop($this->key_id);
     $db = new PHPWS_DB($table);
     $db->addWhere('id', $this->id);
     // Remove any possible children
     $db->addWhere('pid', $this->id, null, 'or');
     PHPWS_Cache::clearCache();
     return $db->delete();
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:11,代码来源:Event.php


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