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


PHP Resource::delete方法代码示例

本文整理汇总了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;
 }
开发者ID:searchfirst,项目名称:Lenore,代码行数:10,代码来源:app_model.php

示例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'));
 }
开发者ID:xfra35,项目名称:fabulog,代码行数:15,代码来源:user.php

示例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'));
 }
开发者ID:theralfbrown,项目名称:OWASP-mth3l3m3nt-framework,代码行数:14,代码来源:webot.php

示例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":
开发者ID:nevermind89x,项目名称:Mi-morelia,代码行数:31,代码来源:do.php

示例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'));
 }
开发者ID:alienwithin,项目名称:OWASP-mth3l3m3nt-framework,代码行数:26,代码来源:ctdb.php

示例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;
 }
开发者ID:floatingpointsoftware,项目名称:grapevine,代码行数:18,代码来源:EloquentRepository.php


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