當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。