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


PHP AmazonS3::enable_debug_mode方法代码示例

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


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

示例1: configure

 /**
  * Recieves all configuration values and sets up this instance
  *
  * All configuration should be handled here
  *
  * @param array $config
  */
 protected function configure($config)
 {
     // Configurable instance variables (if not set, use the instance default)
     $this->debug = isset($config['enable-debug-mode']) ? $config['enable-debug-mode'] : $this->debug;
     $this->folderIcon = $config['icons']['path'] . $config['icons']['directory'];
     $this->bucket = isset($config['s3-bucket']) ? $config['s3-bucket'] : $this->bucket;
     $this->rootDirectory = isset($config['doc_root']) ? trim($config['doc_root'], '/ ') : $this->rootDirectory;
     $this->createRootDir = isset($config['create-root-dir']) ? $config['create-root-dir'] : $this->createRootDir;
     $this->domain = isset($config['s3-public-domain']) ? $config['s3-public-domain'] : $this->domain;
     $this->cacheScheme = isset($config['aws-cache-scheme']) ? $config['aws-cache-scheme'] : $this->cacheScheme;
     $this->cacheExpire = isset($config['aws-cache-expirein']) ? $config['aws-cache-expirein'] : $this->cacheExpire;
     $this->uploadMaxMb = isset($config['upload']['size']) ? (int) $config['upload']['size'] : $this->uploadMaxMb;
     // if we are in debug mode, auto-expire cache
     $this->cacheExpire = $this->debug ? self::DEFAULT_CACHE_EXPIRE : $this->cacheExpire;
     // set global static credentials
     CFCredentials::set(array('@default' => array('key' => $config['aws-access-key'], 'secret' => $config['aws-secret-key'], 'default_cache_config' => $this->cacheScheme, 'certificate_authority' => false)));
     // Instantiate the AmazonS3 class (we should probably be injecting this)
     $this->s3 = new AmazonS3();
     // if we are in debug mode put the http-client into debug mode
     $this->s3->enable_debug_mode($this->debug);
 }
开发者ID:lucasmilin,项目名称:filemanager-php-s3-plugin,代码行数:28,代码来源:filemanager.s3.class.php


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