Skip to content

Commit 017e9cc

Browse files
committed
release 0.0.1-beta source code for php
0 parents  commit 017e9cc

File tree

1,011 files changed

+373669
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,011 files changed

+373669
-0
lines changed

CHANGELOG.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# 0.0.1-beta 2022-11-29
2+
3+
### G42Cloud SDK CDN
4+
5+
- _Features_
6+
- New Support CDN
7+
- _Bug Fix_
8+
- None
9+
- _Change_
10+
- None
11+
12+
### G42Cloud SDK VPC
13+
14+
- _Features_
15+
- New Support VPC
16+
- _Bug Fix_
17+
- None
18+
- _Change_
19+
- None
20+
21+
### G42Cloud SDK ECS
22+
23+
- _Features_
24+
- New Support ECS
25+
- _Bug Fix_
26+
- None
27+
- _Change_
28+
- None
29+
30+
### G42Cloud SDK EVS
31+
32+
- _Features_
33+
- New Support EVS
34+
- _Bug Fix_
35+
- None
36+
- _Change_
37+
- None
38+
39+
### G42Cloud SDK CSE
40+
41+
- _Features_
42+
- New Support CSE
43+
- _Bug Fix_
44+
- None
45+
- _Change_
46+
- None

Core/composer.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "g42cloud/g42cloud-sdk-core",
3+
"description": "G42CLOUD SDK CORE",
4+
"keywords": [
5+
"php",
6+
"sdk",
7+
"rest",
8+
"api",
9+
"core"
10+
],
11+
"version": "0.0.1-beta",
12+
"type": "library",
13+
"license": "Apache-2.0",
14+
"authors": [
15+
{
16+
"name": "G42Cloud_SDK",
17+
"email": "[email protected]",
18+
"homepage": "https://sdkcenter.developer.huaweicloud.com/?language=PHP"
19+
}
20+
],
21+
"minimum-stability": "dev",
22+
"require": {
23+
"php": ">=5.6.0",
24+
"guzzlehttp/guzzle": "6.3.0",
25+
"guzzlehttp/psr7": "1.4.2",
26+
"guzzlehttp/promises": "1.3.1",
27+
"psr/http-message": "1.0.1",
28+
"monolog/monolog": "1.23.0"
29+
}
30+
}

Core/src/Auth/AuthCache.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
4+
namespace G42Cloud\SDK\Core\Auth;
5+
6+
7+
class AuthCache
8+
{
9+
static private $authCache = [];
10+
11+
static function getAuth($akWithName)
12+
{
13+
if(in_array($akWithName,self::$authCache)){
14+
return self::$authCache[$akWithName];
15+
}
16+
return null;
17+
}
18+
19+
static function setAuth($akWithName, $id)
20+
{
21+
self::$authCache[$akWithName] = $id;
22+
}
23+
24+
static function removeAuth($akWithName)
25+
{
26+
unset(self::$authCache[$akWithName]);
27+
}
28+
}

0 commit comments

Comments
 (0)