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