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


PHP AmazonS3::delete_bucket方法代码示例

本文整理汇总了PHP中AmazonS3::delete_bucket方法的典型用法代码示例。如果您正苦于以下问题:PHP AmazonS3::delete_bucket方法的具体用法?PHP AmazonS3::delete_bucket怎么用?PHP AmazonS3::delete_bucket使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AmazonS3的用法示例。


在下文中一共展示了AmazonS3::delete_bucket方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: tearDown

 public function tearDown()
 {
     if ($this->instance) {
         $s3 = new AmazonS3(array('key' => $this->config['amazons3']['key'], 'secret' => $this->config['amazons3']['secret']));
         if ($s3->delete_all_objects($this->id)) {
             $s3->delete_bucket($this->id);
         }
     }
 }
开发者ID:ryanshoover,项目名称:core,代码行数:9,代码来源:amazons3.php

示例2: deleteBucket

 public static function deleteBucket($app)
 {
     $user_storage_s3 = Doctrine::getTable('GcrUserStorageS3')->findOneByAppId($app->getShortName());
     if ($user_storage_s3) {
         $account = GcrUserStorageS3Table::getAccount($app);
         define('AWS_KEY', $account->getAccessKeyId());
         define('AWS_SECRET_KEY', $account->getSecretAccessKey());
         gcr::loadSdk('aws');
         $api = new AmazonS3();
         $api->delete_bucket($user_storage_s3->getBucketName(), true);
         $user_storage_s3->delete();
     }
 }
开发者ID:janaece,项目名称:globalclassroom4_clean,代码行数:13,代码来源:GcrUserStorageS3Table.class.php

示例3: execute

 protected function execute($arguments = array(), $options = array())
 {
     $this->configuration = ProjectConfiguration::getApplicationConfiguration($options['app'], $options['env'], true);
     if (!sfConfig::get('app_sf_amazon_plugin_access_key', false)) {
         throw new sfException(sprintf('You have not set an amazon access key'));
     }
     if (!sfConfig::get('app_sf_amazon_plugin_secret_key', false)) {
         throw new sfException(sprintf('You have not set an amazon secret key'));
     }
     $s3 = new AmazonS3(sfConfig::get('app_sf_amazon_plugin_access_key'), sfConfig::get('app_sf_amazon_plugin_secret_key'));
     $response = $s3->delete_bucket($arguments['bucket'], $options['force']);
     if ($response->isOk()) {
         $this->logSection('Bucket-', sprintf('"%s" bucket has been deleted', $arguments['bucket']));
     } else {
         throw new sfException($this->body->Message);
     }
 }
开发者ID:JoshuaEstes,项目名称:sfAmazonPlugin,代码行数:17,代码来源:s3DeletebucketTask.class.php

示例4: deleteAmazonBucket

 public function deleteAmazonBucket($name)
 {
     ProjectConfiguration::registerAws();
     $s3 = new AmazonS3();
     if ($s3->if_bucket_exists($name)) {
         return $s3->delete_bucket($name, true);
     }
 }
开发者ID:nocoolnametom,项目名称:OpenMicNight,代码行数:8,代码来源:Subreddit.class.php


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