Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions src/Qcloud/Cos/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace Qcloud\Cos;

include("Common.php");

use Qcloud\Cos\Signature;
use GuzzleHttp\Client as HttpClient;
use GuzzleHttp\HandlerStack;
Expand Down Expand Up @@ -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';
Expand All @@ -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'] : "";
Expand Down