提交的内容
This commit is contained in:
@ -148,7 +148,6 @@ class LoginLogic extends BaseLogic
|
||||
} else {
|
||||
$user_info = UserServer::updateUser($response, Client_::mnp, $user_id);
|
||||
}
|
||||
|
||||
//验证用户信息
|
||||
$check_res = self::checkUserInfo($user_info);
|
||||
if (true !== $check_res) {
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
"aliyuncs/oss-sdk-php": "^2.4",
|
||||
"alibabacloud/client": "^1.5",
|
||||
"rmccue/requests": "^2.0",
|
||||
"w7corp/easywechat": "^6.8",
|
||||
"w7corp/easywechat": "^6.7",
|
||||
"tencentcloud/sms": "^3.0",
|
||||
"alipaysdk/easysdk": "^2.2"
|
||||
},
|
||||
|
||||
1582
composer.lock
generated
1582
composer.lock
generated
File diff suppressed because it is too large
Load Diff
0
vendor/aliyuncs/oss-sdk-php/.coveralls.yml
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/.coveralls.yml
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/.gitignore
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/.gitignore
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/.travis.yml
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/.travis.yml
vendored
Executable file → Normal file
17
vendor/aliyuncs/oss-sdk-php/CHANGELOG.md
vendored
Executable file → Normal file
17
vendor/aliyuncs/oss-sdk-php/CHANGELOG.md
vendored
Executable file → Normal file
@ -1,5 +1,22 @@
|
||||
# ChangeLog - Aliyun OSS SDK for PHP
|
||||
|
||||
## v2.7.2 / 2024-10-28
|
||||
* Added: presign supports response-* parameters
|
||||
* Added: forcePathStyle option.
|
||||
|
||||
## v2.7.1 / 2024-02-28
|
||||
* Fixed: fix deprecated
|
||||
|
||||
## v2.7.0 / 2024-02-02
|
||||
* Added: support signature version 4.
|
||||
* Added: support checkObjectEndcoding option.
|
||||
* Added: support strictObjectName option.
|
||||
* Added: support filePathCompatible option.
|
||||
* Added: support path style.
|
||||
* Added: support environment variables credentials provider.
|
||||
* Update: add filed for some api.
|
||||
* Fixed: fix some bugs.
|
||||
|
||||
## v2.6.0 / 2022-08-03
|
||||
* Added: support credentials provider.
|
||||
* Fixed: compatible with swoole curl handler.
|
||||
|
||||
0
vendor/aliyuncs/oss-sdk-php/LICENSE.md
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/LICENSE.md
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/README-CN.md
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/README-CN.md
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/README.md
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/README.md
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/autoload.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/autoload.php
vendored
Executable file → Normal file
2
vendor/aliyuncs/oss-sdk-php/composer.json
vendored
Executable file → Normal file
2
vendor/aliyuncs/oss-sdk-php/composer.json
vendored
Executable file → Normal file
@ -15,7 +15,7 @@
|
||||
},
|
||||
"require-dev" : {
|
||||
"phpunit/phpunit": "*",
|
||||
"satooshi/php-coveralls": "*"
|
||||
"php-coveralls/php-coveralls": "*"
|
||||
},
|
||||
"minimum-stability": "stable",
|
||||
"autoload": {
|
||||
|
||||
0
vendor/aliyuncs/oss-sdk-php/example.jpg
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/example.jpg
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
0
vendor/aliyuncs/oss-sdk-php/index.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/index.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/phpunit.xml
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/phpunit.xml
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/Bucket.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/Bucket.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/BucketCname.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/BucketCname.php
vendored
Executable file → Normal file
67
vendor/aliyuncs/oss-sdk-php/samples/BucketCors.php
vendored
Executable file → Normal file
67
vendor/aliyuncs/oss-sdk-php/samples/BucketCors.php
vendored
Executable file → Normal file
@ -26,7 +26,39 @@ Common::println("bucket $bucket corsConfig created:" . $corsConfig->serializeToX
|
||||
|
||||
// Get cors configuration
|
||||
$corsConfig = $ossClient->getBucketCors($bucket);
|
||||
Common::println("bucket $bucket corsConfig fetched:" . $corsConfig->serializeToXml());
|
||||
|
||||
if ($corsConfig->getResponseVary()){
|
||||
printf("Response Vary : true" .PHP_EOL);
|
||||
}else{
|
||||
printf("Response Vary : false" .PHP_EOL);
|
||||
}
|
||||
|
||||
foreach ($corsConfig->getRules() as $key => $rule){
|
||||
if($rule->getAllowedHeaders()){
|
||||
foreach($rule->getAllowedHeaders() as $header){
|
||||
printf("Allowed Headers :" .$header .PHP_EOL);
|
||||
}
|
||||
}
|
||||
if ($rule->getAllowedMethods()){
|
||||
foreach($rule->getAllowedMethods() as $method){
|
||||
printf("Allowed Methods :" .$method . PHP_EOL);
|
||||
}
|
||||
|
||||
}
|
||||
if($rule->getAllowedOrigins()){
|
||||
foreach($rule->getAllowedOrigins() as $origin){
|
||||
printf("Allowed Origins :" .$origin , PHP_EOL);
|
||||
}
|
||||
|
||||
}
|
||||
if($rule->getExposeHeaders()){
|
||||
foreach($rule->getExposeHeaders() as $exposeHeader){
|
||||
printf("Expose Headers :" .$exposeHeader . PHP_EOL);
|
||||
}
|
||||
}
|
||||
printf("Max Age Seconds :" .$rule->getMaxAgeSeconds() .PHP_EOL);
|
||||
|
||||
}
|
||||
|
||||
// Delete cors configuration
|
||||
$ossClient->deleteBucketCors($bucket);
|
||||
@ -78,13 +110,44 @@ function getBucketCors($ossClient, $bucket)
|
||||
$corsConfig = null;
|
||||
try {
|
||||
$corsConfig = $ossClient->getBucketCors($bucket);
|
||||
|
||||
if ($corsConfig->getResponseVary()){
|
||||
printf("Response Vary : true" .PHP_EOL);
|
||||
}else{
|
||||
printf("Response Vary : false" .PHP_EOL);
|
||||
}
|
||||
foreach ($corsConfig->getRules() as $key => $rule){
|
||||
if($rule->getAllowedHeaders()){
|
||||
foreach($rule->getAllowedHeaders() as $header){
|
||||
printf("Allowed Headers :" .$header .PHP_EOL);
|
||||
}
|
||||
}
|
||||
if ($rule->getAllowedMethods()){
|
||||
foreach($rule->getAllowedMethods() as $method){
|
||||
printf("Allowed Methods :" .$method . PHP_EOL);
|
||||
}
|
||||
|
||||
}
|
||||
if($rule->getAllowedOrigins()){
|
||||
foreach($rule->getAllowedOrigins() as $origin){
|
||||
printf("Allowed Origins :" .$origin , PHP_EOL);
|
||||
}
|
||||
|
||||
}
|
||||
if($rule->getExposeHeaders()){
|
||||
foreach($rule->getExposeHeaders() as $exposeHeader){
|
||||
printf("Expose Headers :" .$exposeHeader . PHP_EOL);
|
||||
}
|
||||
}
|
||||
printf("Max Age Seconds :" .$rule->getMaxAgeSeconds() .PHP_EOL);
|
||||
|
||||
}
|
||||
} catch (OssException $e) {
|
||||
printf(__FUNCTION__ . ": FAILED\n");
|
||||
printf($e->getMessage() . "\n");
|
||||
return;
|
||||
}
|
||||
print(__FUNCTION__ . ": OK" . "\n");
|
||||
print($corsConfig->serializeToXml() . "\n");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
0
vendor/aliyuncs/oss-sdk-php/samples/BucketEncryption.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/BucketEncryption.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/BucketLifecycle.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/BucketLifecycle.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/BucketLogging.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/BucketLogging.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/BucketPayment.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/BucketPayment.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/BucketPolicy.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/BucketPolicy.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/BucketReferer.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/BucketReferer.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/BucketStat.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/BucketStat.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/BucketTags.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/BucketTags.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/BucketTransferAcceleration.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/BucketTransferAcceleration.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/BucketVersion.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/BucketVersion.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/BucketWebsite.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/BucketWebsite.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/BucketWorm.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/BucketWorm.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/Callback.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/Callback.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/Common.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/Common.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/Config.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/Config.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/CredentialsPhp.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/CredentialsPhp.php
vendored
Executable file → Normal file
18
vendor/aliyuncs/oss-sdk-php/samples/CredentialsProvider.php
vendored
Executable file → Normal file
18
vendor/aliyuncs/oss-sdk-php/samples/CredentialsProvider.php
vendored
Executable file → Normal file
@ -4,6 +4,7 @@ require_once __DIR__ . '/Common.php';
|
||||
use OSS\OssClient;
|
||||
use OSS\Core\OssException;
|
||||
use OSS\Credentials\StaticCredentialsProvider;
|
||||
use OSS\Credentials\EnvironmentVariableCredentialsProvider;
|
||||
$bucket = Common::getBucketName();
|
||||
|
||||
// Access Key Provider demo
|
||||
@ -43,3 +44,20 @@ try {
|
||||
printf($e->getMessage() . "\n");
|
||||
return;
|
||||
}
|
||||
|
||||
// read from env
|
||||
$envProvider = new EnvironmentVariableCredentialsProvider();
|
||||
$config = array(
|
||||
'provider' => $envProvider,
|
||||
'endpoint'=> "<endpoint>"
|
||||
);
|
||||
|
||||
try {
|
||||
$ossClient = new OssClient($config);
|
||||
$ossClient->putObject($bucket,'c.file','hi oss,this is credentials test of sts provider');
|
||||
$result = $ossClient->getObject($bucket,'c.file');
|
||||
var_dump($result);
|
||||
} catch (OssException $e) {
|
||||
printf($e->getMessage() . "\n");
|
||||
return;
|
||||
}
|
||||
|
||||
0
vendor/aliyuncs/oss-sdk-php/samples/Image.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/Image.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/LiveChannel.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/LiveChannel.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/MultipartUpload.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/MultipartUpload.php
vendored
Executable file → Normal file
80
vendor/aliyuncs/oss-sdk-php/samples/Object.php
vendored
Executable file → Normal file
80
vendor/aliyuncs/oss-sdk-php/samples/Object.php
vendored
Executable file → Normal file
@ -227,30 +227,47 @@ function listObjects($ossClient, $bucket)
|
||||
);
|
||||
try {
|
||||
$listObjectInfo = $ossClient->listObjects($bucket, $options);
|
||||
} catch (OssException $e) {
|
||||
printf(__FUNCTION__ . ": FAILED\n");
|
||||
printf($e->getMessage() . "\n");
|
||||
return;
|
||||
}
|
||||
print(__FUNCTION__ . ": OK" . "\n");
|
||||
printf("Bucket Name: %s". "\n",$listObjectInfo->getBucketName());
|
||||
printf("Prefix: %s". "\n",$listObjectInfo->getPrefix());
|
||||
printf("Marker: %s". "\n",$listObjectInfo->getMarker());
|
||||
printf("Next Marker: %s". "\n",$listObjectInfo->getNextMarker());
|
||||
printf("Max Keys: %s". "\n",$listObjectInfo->getMaxKeys());
|
||||
printf("Delimiter: %s". "\n",$listObjectInfo->getDelimiter());
|
||||
printf("Is Truncated: %s". "\n",$listObjectInfo->getIsTruncated());
|
||||
$objectList = $listObjectInfo->getObjectList(); // object list
|
||||
$prefixList = $listObjectInfo->getPrefixList(); // directory list
|
||||
if (!empty($objectList)) {
|
||||
print("objectList:\n");
|
||||
foreach ($objectList as $objectInfo) {
|
||||
print($objectInfo->getKey() . "\n");
|
||||
if($objectInfo->getOwner() != null){
|
||||
printf("owner id:".$objectInfo->getOwner()->getId() . "\n");
|
||||
printf("owner name:".$objectInfo->getOwner()->getDisplayName() . "\n");
|
||||
printf("Object Name: %s". "\n",$objectInfo->getKey());
|
||||
printf("Object Size: %s". "\n",$objectInfo->getSize());
|
||||
printf("Object Type: %s". "\n",$objectInfo->getType());
|
||||
printf("Object ETag: %s". "\n",$objectInfo->getETag());
|
||||
printf("Object Last Modified: %s". "\n",$objectInfo->getLastModified());
|
||||
printf("Object Storage Class: %s". "\n",$objectInfo->getStorageClass());
|
||||
|
||||
if ($objectInfo->getRestoreInfo()){
|
||||
printf("Restore Info: %s". "\n",$objectInfo->getRestoreInfo() );
|
||||
}
|
||||
|
||||
if($objectInfo->getOwner()){
|
||||
printf("Owner Id:".$objectInfo->getOwner()->getId() . "\n");
|
||||
printf("Owner Name:".$objectInfo->getOwner()->getDisplayName() . "\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!empty($prefixList)) {
|
||||
print("prefixList: \n");
|
||||
foreach ($prefixList as $prefixInfo) {
|
||||
print($prefixInfo->getPrefix() . "\n");
|
||||
printf("Common Prefix:%s\n",$prefixInfo->getPrefix());
|
||||
}
|
||||
}
|
||||
} catch (OssException $e) {
|
||||
printf(__FUNCTION__ . ": FAILED\n");
|
||||
printf($e->getMessage() . "\n");
|
||||
return;
|
||||
}
|
||||
print(__FUNCTION__ . ": OK" . "\n");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -276,30 +293,49 @@ function listObjectsV2($ossClient, $bucket)
|
||||
);
|
||||
try {
|
||||
$listObjectInfo = $ossClient->listObjectsV2($bucket, $options);
|
||||
} catch (OssException $e) {
|
||||
printf(__FUNCTION__ . ": FAILED\n");
|
||||
printf($e->getMessage() . "\n");
|
||||
return;
|
||||
}
|
||||
print(__FUNCTION__ . ": OK" . "\n");
|
||||
printf("Bucket Name: %s". "\n",$listObjectInfo->getBucketName());
|
||||
printf("Prefix: %s". "\n",$listObjectInfo->getPrefix());
|
||||
printf("Next Continuation Token: %s". "\n",$listObjectInfo->getNextContinuationToken());
|
||||
printf("Continuation Token: %s". "\n",$listObjectInfo->getContinuationToken());
|
||||
printf("Max Keys: %s". "\n",$listObjectInfo->getMaxKeys());
|
||||
printf("Key Count: %s". "\n",$listObjectInfo->getKeyCount());
|
||||
printf("Delimiter: %s". "\n",$listObjectInfo->getDelimiter());
|
||||
printf("Is Truncated: %s". "\n",$listObjectInfo->getIsTruncated());
|
||||
printf("Start After: %s". "\n",$listObjectInfo->getStartAfter());
|
||||
$objectList = $listObjectInfo->getObjectList(); // object list
|
||||
$prefixList = $listObjectInfo->getPrefixList(); // directory list
|
||||
if (!empty($objectList)) {
|
||||
print("objectList:\n");
|
||||
foreach ($objectList as $objectInfo) {
|
||||
print($objectInfo->getKey() . "\n");
|
||||
if($objectInfo->getOwner() != null){
|
||||
printf("owner id:".$objectInfo->getOwner()->getId() . "\n");
|
||||
printf("owner name:".$objectInfo->getOwner()->getDisplayName() . "\n");
|
||||
printf("Object Name: %s". "\n",$objectInfo->getKey());
|
||||
printf("Object Size: %s". "\n",$objectInfo->getSize());
|
||||
printf("Object Type: %s". "\n",$objectInfo->getType());
|
||||
printf("Object ETag: %s". "\n",$objectInfo->getETag());
|
||||
printf("Object Last Modified: %s". "\n",$objectInfo->getLastModified());
|
||||
printf("Object Storage Class: %s". "\n",$objectInfo->getStorageClass());
|
||||
|
||||
if ($objectInfo->getRestoreInfo()){
|
||||
printf("Restore Info: %s". "\n",$objectInfo->getRestoreInfo() );
|
||||
}
|
||||
|
||||
if($objectInfo->getOwner()){
|
||||
printf("Owner Id:".$objectInfo->getOwner()->getId() . "\n");
|
||||
printf("Owner Name:".$objectInfo->getOwner()->getDisplayName() . "\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!empty($prefixList)) {
|
||||
print("prefixList: \n");
|
||||
foreach ($prefixList as $prefixInfo) {
|
||||
print($prefixInfo->getPrefix() . "\n");
|
||||
printf("Common Prefix:%s\n",$prefixInfo->getPrefix());
|
||||
}
|
||||
}
|
||||
} catch (OssException $e) {
|
||||
printf(__FUNCTION__ . ": FAILED\n");
|
||||
printf($e->getMessage() . "\n");
|
||||
return;
|
||||
}
|
||||
print(__FUNCTION__ . ": OK" . "\n");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
0
vendor/aliyuncs/oss-sdk-php/samples/ObjectTagging.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/ObjectTagging.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/RunAll.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/RunAll.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/Signature.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/samples/Signature.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Core/MimeTypes.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Core/MimeTypes.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Core/OssException.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Core/OssException.php
vendored
Executable file → Normal file
13
vendor/aliyuncs/oss-sdk-php/src/OSS/Core/OssUtil.php
vendored
Executable file → Normal file
13
vendor/aliyuncs/oss-sdk-php/src/OSS/Core/OssUtil.php
vendored
Executable file → Normal file
@ -193,7 +193,6 @@ class OssUtil
|
||||
*
|
||||
* @param array $options
|
||||
* @throws OssException
|
||||
* @return boolean
|
||||
*/
|
||||
public static function validateOptions($options)
|
||||
{
|
||||
@ -372,7 +371,8 @@ BBB;
|
||||
* Get the host:port from endpoint.
|
||||
*
|
||||
* @param string $endpoint the endpoint.
|
||||
* @return boolean
|
||||
* @return string
|
||||
* @throws OssException
|
||||
*/
|
||||
public static function getHostPortFromEndpoint($endpoint)
|
||||
{
|
||||
@ -531,4 +531,13 @@ BBB;
|
||||
throw new OssException("Unrecognized encoding type: " . $encoding);
|
||||
}
|
||||
}
|
||||
|
||||
public static function unparseUrl($parsed_url) {
|
||||
$scheme = isset($parsed_url['scheme']) ? $parsed_url['scheme'] . '://' : '';
|
||||
$host = isset($parsed_url['host']) ? $parsed_url['host'] : '';
|
||||
$port = isset($parsed_url['port']) ? ':' . $parsed_url['port'] : '';
|
||||
$path = isset($parsed_url['path']) ? $parsed_url['path'] : '';
|
||||
$query = isset($parsed_url['query']) ? '?' . $parsed_url['query'] : '';
|
||||
return "$scheme$host$port$path$query";
|
||||
}
|
||||
}
|
||||
|
||||
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Credentials/Credentials.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Credentials/Credentials.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Credentials/CredentialsProvider.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Credentials/CredentialsProvider.php
vendored
Executable file → Normal file
20
vendor/aliyuncs/oss-sdk-php/src/OSS/Credentials/EnvironmentVariableCredentialsProvider.php
vendored
Normal file
20
vendor/aliyuncs/oss-sdk-php/src/OSS/Credentials/EnvironmentVariableCredentialsProvider.php
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
namespace OSS\Credentials;
|
||||
|
||||
use OSS\Core\OssException;
|
||||
|
||||
class EnvironmentVariableCredentialsProvider implements CredentialsProvider
|
||||
{
|
||||
|
||||
/**
|
||||
* @return Credentials
|
||||
* @throws OssException
|
||||
*/
|
||||
public function getCredentials()
|
||||
{
|
||||
$ak= getenv('OSS_ACCESS_KEY_ID');
|
||||
$sk = getenv('OSS_ACCESS_KEY_SECRET');
|
||||
$token = getenv('OSS_SESSION_TOKEN');
|
||||
return new Credentials($ak, $sk, $token);
|
||||
}
|
||||
}
|
||||
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Credentials/StaticCredentialsProvider.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Credentials/StaticCredentialsProvider.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Http/LICENSE
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Http/LICENSE
vendored
Executable file → Normal file
2
vendor/aliyuncs/oss-sdk-php/src/OSS/Http/RequestCore.php
vendored
Executable file → Normal file
2
vendor/aliyuncs/oss-sdk-php/src/OSS/Http/RequestCore.php
vendored
Executable file → Normal file
@ -170,7 +170,7 @@ class RequestCore
|
||||
public $registered_streaming_write_callback = null;
|
||||
|
||||
/**
|
||||
* The request timeout time, which is 5,184,000 seconds,that is, 6 days by default
|
||||
* The request timeout time, which is 5,184,000 seconds,that is, 60 days by default
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
|
||||
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Http/RequestCore_Exception.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Http/RequestCore_Exception.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Http/ResponseCore.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Http/ResponseCore.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/BucketInfo.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/BucketInfo.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/BucketListInfo.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/BucketListInfo.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/BucketStat.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/BucketStat.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/CnameConfig.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/CnameConfig.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/CnameTokenInfo.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/CnameTokenInfo.php
vendored
Executable file → Normal file
31
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/CorsConfig.php
vendored
Executable file → Normal file
31
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/CorsConfig.php
vendored
Executable file → Normal file
@ -45,10 +45,26 @@ class CorsConfig implements XmlConfig
|
||||
}
|
||||
$this->rules[] = $rule;
|
||||
}
|
||||
/**
|
||||
* @param boolean $value
|
||||
*/
|
||||
public function setResponseVary($value)
|
||||
{
|
||||
$this->responseVary = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function getResponseVary(){
|
||||
if (isset($this->responseVary)) {
|
||||
return $this->responseVary;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse CorsConfig from the xml.
|
||||
*
|
||||
* @param string $strXml
|
||||
* @throws OssException
|
||||
* @return null
|
||||
@ -56,6 +72,10 @@ class CorsConfig implements XmlConfig
|
||||
public function parseFromXml($strXml)
|
||||
{
|
||||
$xml = simplexml_load_string($strXml);
|
||||
if(isset($xml->ResponseVary)){
|
||||
$this->responseVary =
|
||||
(strval($xml->ResponseVary) === 'TRUE' || strval($xml->ResponseVary) === 'true') ? true : false;
|
||||
}
|
||||
if (!isset($xml->CORSRule)) return;
|
||||
foreach ($xml->CORSRule as $rule) {
|
||||
$corsRule = new CorsRule();
|
||||
@ -74,7 +94,6 @@ class CorsConfig implements XmlConfig
|
||||
}
|
||||
$this->addRule($corsRule);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -89,6 +108,13 @@ class CorsConfig implements XmlConfig
|
||||
$xmlRule = $xml->addChild('CORSRule');
|
||||
$rule->appendToXml($xmlRule);
|
||||
}
|
||||
if(isset($this->responseVary)){
|
||||
if ($this->responseVary) {
|
||||
$xml->addChild('ResponseVary', 'true');
|
||||
} else {
|
||||
$xml->addChild('ResponseVary', 'false');
|
||||
}
|
||||
}
|
||||
return $xml->asXML();
|
||||
}
|
||||
|
||||
@ -110,4 +136,5 @@ class CorsConfig implements XmlConfig
|
||||
* @var CorsRule[]
|
||||
*/
|
||||
private $rules = array();
|
||||
private $responseVary;
|
||||
}
|
||||
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/CorsRule.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/CorsRule.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/DeleteMarkerInfo.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/DeleteMarkerInfo.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/DeleteObjectInfo.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/DeleteObjectInfo.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/DeletedObjectInfo.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/DeletedObjectInfo.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/ExtendWormConfig.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/ExtendWormConfig.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/GetLiveChannelHistory.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/GetLiveChannelHistory.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/GetLiveChannelInfo.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/GetLiveChannelInfo.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/GetLiveChannelStatus.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/GetLiveChannelStatus.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/InitiateWormConfig.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/InitiateWormConfig.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/LifecycleAction.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/LifecycleAction.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/LifecycleConfig.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/LifecycleConfig.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/LifecycleRule.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/LifecycleRule.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/ListMultipartUploadInfo.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/ListMultipartUploadInfo.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/ListPartsInfo.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/ListPartsInfo.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/LiveChannelConfig.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/LiveChannelConfig.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/LiveChannelHistory.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/LiveChannelHistory.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/LiveChannelInfo.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/LiveChannelInfo.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/LiveChannelListInfo.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/LiveChannelListInfo.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/LoggingConfig.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/LoggingConfig.php
vendored
Executable file → Normal file
28
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/ObjectInfo.php
vendored
Executable file → Normal file
28
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/ObjectInfo.php
vendored
Executable file → Normal file
@ -24,8 +24,10 @@ class ObjectInfo
|
||||
* @param string $type
|
||||
* @param string $size
|
||||
* @param string $storageClass
|
||||
* @param Owner|null $owner
|
||||
* @param null $restoreInfo
|
||||
*/
|
||||
public function __construct($key, $lastModified, $eTag, $type, $size, $storageClass)
|
||||
public function __construct($key, $lastModified, $eTag, $type, $size, $storageClass,$owner=null,$restoreInfo=null)
|
||||
{
|
||||
$this->key = $key;
|
||||
$this->lastModified = $lastModified;
|
||||
@ -33,6 +35,8 @@ class ObjectInfo
|
||||
$this->type = $type;
|
||||
$this->size = $size;
|
||||
$this->storageClass = $storageClass;
|
||||
$this->owner = $owner;
|
||||
$this->restoreInfo = $restoreInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -94,10 +98,32 @@ class ObjectInfo
|
||||
return $this->storageClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getRestoreInfo()
|
||||
{
|
||||
return $this->restoreInfo;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return Owner|null
|
||||
*/
|
||||
public function getOwner()
|
||||
{
|
||||
return $this->owner;
|
||||
}
|
||||
|
||||
private $key = "";
|
||||
private $lastModified = "";
|
||||
private $eTag = "";
|
||||
private $type = "";
|
||||
private $size = "0";
|
||||
private $storageClass = "";
|
||||
/**
|
||||
* @var Owner
|
||||
*/
|
||||
private $owner;
|
||||
private $restoreInfo;
|
||||
}
|
||||
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/ObjectListInfo.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/ObjectListInfo.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/ObjectListInfoV2.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/ObjectListInfoV2.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/ObjectVersionInfo.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/ObjectVersionInfo.php
vendored
Executable file → Normal file
4
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/ObjectVersionListInfo.php
vendored
Executable file → Normal file
4
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/ObjectVersionListInfo.php
vendored
Executable file → Normal file
@ -22,7 +22,7 @@ class ObjectVersionListInfo
|
||||
* @param string $nextVersionIdMarker
|
||||
* @param string $maxKeys
|
||||
* @param string $delimiter
|
||||
* @param null $isTruncated
|
||||
* @param null|string $isTruncated
|
||||
* @param array $objectversionList
|
||||
* @param array $deleteMarkerList
|
||||
* @param array $prefixList
|
||||
@ -151,7 +151,7 @@ class ObjectVersionListInfo
|
||||
private $prefix = "";
|
||||
private $keyMarker = "";
|
||||
private $nextKeyMarker = "";
|
||||
private $versionIdmarker = "";
|
||||
private $versionIdMarker = "";
|
||||
private $nextVersionIdMarker = "";
|
||||
private $maxKeys = 0;
|
||||
private $delimiter = "";
|
||||
|
||||
46
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/Owner.php
vendored
Normal file
46
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/Owner.php
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace OSS\Model;
|
||||
|
||||
/**
|
||||
* Class Owner
|
||||
*
|
||||
* ListObjects return owner list of classes
|
||||
* The returned data contains two arrays
|
||||
* One is to get the list of objects【Can be understood as the corresponding file system file list】
|
||||
* One is to get owner list
|
||||
*
|
||||
*/
|
||||
class Owner
|
||||
{
|
||||
/**
|
||||
* OwnerInfo constructor.
|
||||
* @param $id string
|
||||
* @param $displayName string
|
||||
*/
|
||||
public function __construct($id, $displayName)
|
||||
{
|
||||
$this->id = $id;
|
||||
$this->displayName = $displayName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getDisplayName()
|
||||
{
|
||||
return $this->displayName;
|
||||
}
|
||||
|
||||
private $id;
|
||||
private $displayName;
|
||||
}
|
||||
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/PartInfo.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/PartInfo.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/PrefixInfo.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/PrefixInfo.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/RefererConfig.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/RefererConfig.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/RequestPaymentConfig.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/RequestPaymentConfig.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/RestoreConfig.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/RestoreConfig.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/ServerSideEncryptionConfig.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/ServerSideEncryptionConfig.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/StorageCapacityConfig.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/StorageCapacityConfig.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/Tag.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/Tag.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/TaggingConfig.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/TaggingConfig.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/TransferAccelerationConfig.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/TransferAccelerationConfig.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/UploadInfo.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/UploadInfo.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/VersioningConfig.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/VersioningConfig.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/WebsiteConfig.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/WebsiteConfig.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/WormConfig.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/WormConfig.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/XmlConfig.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Model/XmlConfig.php
vendored
Executable file → Normal file
1044
vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php
vendored
Executable file → Normal file
1044
vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php
vendored
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user