diff --git a/composer.json b/composer.json index 6eecca14..3add560b 100644 --- a/composer.json +++ b/composer.json @@ -16,9 +16,10 @@ } ], "autoload": { - "psr-0": { - "Qcloud\\Cos\\": "src/" - } + "psr-4": { + "Qcloud\\Cos\\": "src/Qcloud/Cos/" + }, + "files": ["src/Qcloud/Cos/Common.php"] }, "require": { "php": ">=5.3.0", diff --git a/src/Qcloud/Cos/Client.php b/src/Qcloud/Cos/Client.php index a4de6e4a..167afb67 100644 --- a/src/Qcloud/Cos/Client.php +++ b/src/Qcloud/Cos/Client.php @@ -2,8 +2,6 @@ namespace Qcloud\Cos; -include("Common.php"); - use Qcloud\Cos\Signature; use GuzzleHttp\Client as HttpClient; use GuzzleHttp\HandlerStack; @@ -75,6 +73,8 @@ * @method object HeadBucket (array $arg) * @method object UploadPartCopy (array $arg) * @method object SelectObjectContent (array $arg) + * @method object PutBucketIntelligentTiering (array $arg) + * @method object GetBucketIntelligentTiering (array $arg) */ class Client extends GuzzleClient { const VERSION = '2.1.3'; @@ -92,7 +92,7 @@ class Client extends GuzzleClient { public function __construct($cosConfig) { $this->rawCosConfig = $cosConfig; $this->cosConfig['schema'] = isset($cosConfig['schema']) ? $cosConfig['schema'] : 'http'; - $this->cosConfig['region'] = region_map($cosConfig['region']); + $this->cosConfig['region'] = region_map($cosConfig['region']); $this->cosConfig['appId'] = isset($cosConfig['credentials']['appId']) ? $cosConfig['credentials']['appId'] : null; $this->cosConfig['secretId'] = isset($cosConfig['credentials']['secretId']) ? $cosConfig['credentials']['secretId'] : ""; $this->cosConfig['secretKey'] = isset($cosConfig['credentials']['secretKey']) ? $cosConfig['credentials']['secretKey'] : "";