本文整理汇总了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());
}
示例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();
}
示例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;
}
示例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;
}
示例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();
}