Skip to content

Commit 23f45c0

Browse files
authored
Use psr-4 instead of psr-0, add files (#183)
1 parent e11f276 commit 23f45c0

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

composer.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@
1616
}
1717
],
1818
"autoload": {
19-
"psr-0": {
20-
"Qcloud\\Cos\\": "src/"
21-
}
19+
"psr-4": {
20+
"Qcloud\\Cos\\": "src/Qcloud/Cos/"
21+
},
22+
"files": ["src/Qcloud/Cos/Common.php"]
2223
},
2324
"require": {
2425
"php": ">=5.3.0",

src/Qcloud/Cos/Client.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
namespace Qcloud\Cos;
44

5-
include("Common.php");
6-
75
use Qcloud\Cos\Signature;
86
use GuzzleHttp\Client as HttpClient;
97
use GuzzleHttp\HandlerStack;
@@ -75,6 +73,8 @@
7573
* @method object HeadBucket (array $arg)
7674
* @method object UploadPartCopy (array $arg)
7775
* @method object SelectObjectContent (array $arg)
76+
* @method object PutBucketIntelligentTiering (array $arg)
77+
* @method object GetBucketIntelligentTiering (array $arg)
7878
*/
7979
class Client extends GuzzleClient {
8080
const VERSION = '2.1.3';
@@ -92,7 +92,7 @@ class Client extends GuzzleClient {
9292
public function __construct($cosConfig) {
9393
$this->rawCosConfig = $cosConfig;
9494
$this->cosConfig['schema'] = isset($cosConfig['schema']) ? $cosConfig['schema'] : 'http';
95-
$this->cosConfig['region'] = region_map($cosConfig['region']);
95+
$this->cosConfig['region'] = region_map($cosConfig['region']);
9696
$this->cosConfig['appId'] = isset($cosConfig['credentials']['appId']) ? $cosConfig['credentials']['appId'] : null;
9797
$this->cosConfig['secretId'] = isset($cosConfig['credentials']['secretId']) ? $cosConfig['credentials']['secretId'] : "";
9898
$this->cosConfig['secretKey'] = isset($cosConfig['credentials']['secretKey']) ? $cosConfig['credentials']['secretKey'] : "";

0 commit comments

Comments
 (0)