當前位置: 首頁>>代碼示例>>PHP>>正文


PHP S3Client::clearBucket方法代碼示例

本文整理匯總了PHP中Aws\S3\S3Client::clearBucket方法的典型用法代碼示例。如果您正苦於以下問題:PHP S3Client::clearBucket方法的具體用法?PHP S3Client::clearBucket怎麽用?PHP S3Client::clearBucket使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Aws\S3\S3Client的用法示例。


在下文中一共展示了S3Client::clearBucket方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: testDeleteTrails

 /**
  * Execute the DescribeTrails and DeleteTrail operations
  *
  * @example Aws\CloudTrail\CloudTrailClient::deleteTrail
  * @example Aws\CloudTrail\CloudTrailClient::getDescribeTrailsIterator
  * @depends testStopLogging
  */
 public function testDeleteTrails($bucket)
 {
     $client = $this->cloudtrail;
     // @begin
     // List and delete all of the trails
     $trails = $client->getDescribeTrailsIterator();
     foreach ($trails as $trail) {
         $client->deleteTrail(array('Name' => $trail['Name']));
         echo "Deleted trail {$trail['Name']}.\n";
     }
     // @end
     $this->assertEquals("Deleted trail test-trail.\n", $this->getActualOutput());
     // Clean up test bucket
     sleep(5);
     if ($this->s3->doesBucketExist($bucket)) {
         $this->s3->clearBucket($bucket);
         $this->s3->deleteBucket(array('Bucket' => $bucket));
     }
 }
開發者ID:iLoiLohas,項目名稱:pinchshopper,代碼行數:26,代碼來源:IntegrationTest.php

示例2: clearBucket

 /**
  * Helper used to clear the contents of a bucket. Use the {@see ClearBucket} object directly
  * for more advanced options and control.
  *
  * @param string $bucket Name of the bucket to clear.
  *
  * @return int Returns the number of deleted keys
  */
 public function clearBucket($bucket)
 {
     return $this->instance->clearBucket($bucket);
 }
開發者ID:Webiny,項目名稱:Framework,代碼行數:12,代碼來源:S3.php

示例3: clear

 /**
  * clear
  *
  * @return integer
  */
 public function clear()
 {
     return $this->client->clearBucket($this->name);
 }
開發者ID:m6web,項目名稱:aws-bundle,代碼行數:9,代碼來源:Bucket.php


注:本文中的Aws\S3\S3Client::clearBucket方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。