本文整理汇总了PHP中Resource::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP Resource::delete方法的具体用法?PHP Resource::delete怎么用?PHP Resource::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Resource
的用法示例。
在下文中一共展示了Resource::delete方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: afterDelete
function afterDelete()
{
$resource = new Resource();
if (!empty(Resource::$delete_list) && $this->name != 'Resource') {
foreach (Resource::$delete_list as $res) {
$resource->delete($res);
}
}
return true;
}
示例2: delete
public function delete(\Base $f3, $params)
{
$this->resource->reset();
$msg = \Flash::instance();
if (isset($params['id'])) {
$this->resource->load(array('_id = ?', $params['id']));
if ($f3->get('HOST') == 'ikkez.de' && !$this->resource->dry() && $this->resource->username == 'admin') {
$msg->addMessage("You are not allowed to delete the demo-admin", 'danger');
$f3->reroute('/admin/' . $params['module']);
return;
}
parent::delete($f3, $params);
}
$f3->reroute($f3->get('SESSION.LastPageURL'));
}
示例3: delete
/**
* @param \Base $f3
* @param array $params
*/
public function delete(\Base $f3, $params)
{
$this->resource->reset();
$msg = \Flash::instance();
if (isset($params['id'])) {
$this->resource->load(array('_id = ?', $params['id']));
parent::delete($f3, $params);
}
$f3->reroute($f3->get('SESSION.LastPageURL'));
}
示例4: fFile
case 17:
$section = "turismb";
break;
case 18:
$section = "profile";
break;
case 20:
$section = "university";
break;
}
$file1 = new fFile("../uploads/{$section}/" . $resource->prepareUrl());
$file1->delete();
$file1 = new fFile("../uploads/{$section}/thumbs/" . $resource->prepareUrl());
$file1->delete();
}
$resource->delete();
exit("1");
break;
case "load_categories":
require_once LOAD . 'load_categories.php';
break;
case "load_giro":
require_once LOAD . 'load_giro.php';
break;
case "updateStatus":
require_once LOAD . 'updateStatus.php';
break;
case "load_girot":
require_once LOAD . 'load_girot.php';
break;
case "load_vehicle":
示例5: delete
/**
* Delete Cookies & Files with content from hooking page
* @param \Base $f3
* @param array $params
*/
public function delete(\Base $f3, $params)
{
$this->resource->reset();
$msg = \Flash::instance();
if (isset($params['id'])) {
$this->resource->load(array('_id = ?', $params['id']));
$url1 = $this->resource->vulnerablePageContent;
$url2 = $this->resource->indirect_target_page;
$url3 = $this->resource->vulnerableUrl;
$vulnPage = $f3->ROOT . parse_url($url1, PHP_URL_PATH);
$targetPage = $f3->ROOT . parse_url($url2, PHP_URL_PATH);
$attack_script = $f3->ROOT . $f3->BASE . '/scripts/' . parse_url($url3, PHP_URL_HOST) . '.js';
if (file_exists($vulnPage) || file_exists($targetPage) || file_exists($attack_script)) {
unlink($vulnPage);
unlink($targetPage);
unlink($attack_script);
}
parent::delete($f3, $params);
}
$f3->reroute($f3->get('SESSION.LastPageURL'));
}
示例6: delete
/**
* Delete a specific resource. Returns the resource that was deleted.
*
* @deprecated
* @param Resource $resource
* @param boolean $permanent
* @fires Resource.Deleted
* @return Resource
*/
public function delete($resource, $permanent = false)
{
if ($permanent) {
$resource->forceDelete();
} else {
$resource->delete();
}
return $resource;
}