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


PHP S3Client::deleteBucket方法代碼示例

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


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

示例1: delete

 /**
  * delete
  *
  * @param boolean $wait
  *
  * @return \Guzzle\Service\Resource\Model
  */
 public function delete($wait = false)
 {
     $response = $this->client->deleteBucket(['Bucket' => $this->name]);
     if ($wait) {
         $this->client->waitUntilBucketNotExists(['Bucket' => $this->name]);
     }
     return $response;
 }
開發者ID:m6web,項目名稱:aws-bundle,代碼行數:15,代碼來源:Bucket.php

示例2: deleteContainer

 /**
  * @param string $container
  * @param bool   $force
  *
  * @throws DfException
  */
 public function deleteContainer($container = '', $force = false)
 {
     try {
         $this->checkConnection();
         $this->blobConn->deleteBucket(['Bucket' => $container]);
     } catch (\Exception $ex) {
         throw new DfException('Failed to delete container "' . $container . '": ' . $ex->getMessage());
     }
 }
開發者ID:pkdevboxy,項目名稱:df-aws,代碼行數:15,代碼來源:S3FileSystem.php

示例3: tearDownAfterClass

 public static function tearDownAfterClass()
 {
     parent::tearDownAfterClass();
     try {
         $clear = new \Aws\S3\Model\ClearBucket(self::$client, self::$test_upload_bucket);
         $clear->clear();
         self::$client->deleteBucket(array('Bucket' => self::$test_upload_bucket));
         self::$client->waitUntilBucketNotExists(array('Bucket' => self::$test_upload_bucket));
     } catch (\Exception $exception) {
     }
 }
開發者ID:postelin,項目名稱:php-queue,代碼行數:11,代碼來源:AmazonS3V2Test.php

示例4: testPutBucketLocation

 /**
  * @depends testHeadBucket
  */
 public function testPutBucketLocation()
 {
     $this->log(__METHOD__);
     $bucketName = self::getResourcePrefix() . '-s3eutest';
     try {
         $this->client->headBucket(array('Bucket' => $bucketName));
     } catch (\Exception $e) {
         $this->client->createBucket(array('Bucket' => $bucketName, 'LocationConstraint' => 'EU'));
     }
     $this->client->waitUntil('bucket_exists', array('Bucket' => $bucketName));
     $result = $this->client->getBucketLocation(array('Bucket' => $bucketName));
     $this->assertEquals('EU', $result['Location']);
     $this->client->deleteBucket(array('Bucket' => $bucketName));
 }
開發者ID:myrichhub,項目名稱:mssapi_php,代碼行數:17,代碼來源:IntegrationTest.php

示例5: 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

示例6: deleteBucket

 /**
  * Deletes the bucket.
  * All objects (including all object versions and Delete Markers) in the bucket must be deleted before the bucket itself can be deleted.
  *
  * @param $bucket
  *
  * @return mixed
  */
 public function deleteBucket($bucket)
 {
     $params['Bucket'] = $bucket;
     return $this->instance->deleteBucket($params);
 }
開發者ID:Webiny,項目名稱:Framework,代碼行數:13,代碼來源:S3.php

示例7: tearDown

 public function tearDown()
 {
     $clear = new Aws\S3\Model\ClearBucket($this->_client, $this->_bucket);
     $clear->clear();
     $this->_client->deleteBucket(array('Bucket' => $this->_bucket));
 }
開發者ID:cargomedia,項目名稱:cm,代碼行數:6,代碼來源:ClientTest.php


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