提交的内容
This commit is contained in:
@ -148,7 +148,6 @@ class LoginLogic extends BaseLogic
|
|||||||
} else {
|
} else {
|
||||||
$user_info = UserServer::updateUser($response, Client_::mnp, $user_id);
|
$user_info = UserServer::updateUser($response, Client_::mnp, $user_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
//验证用户信息
|
//验证用户信息
|
||||||
$check_res = self::checkUserInfo($user_info);
|
$check_res = self::checkUserInfo($user_info);
|
||||||
if (true !== $check_res) {
|
if (true !== $check_res) {
|
||||||
|
|||||||
@ -32,7 +32,7 @@
|
|||||||
"aliyuncs/oss-sdk-php": "^2.4",
|
"aliyuncs/oss-sdk-php": "^2.4",
|
||||||
"alibabacloud/client": "^1.5",
|
"alibabacloud/client": "^1.5",
|
||||||
"rmccue/requests": "^2.0",
|
"rmccue/requests": "^2.0",
|
||||||
"w7corp/easywechat": "^6.8",
|
"w7corp/easywechat": "^6.7",
|
||||||
"tencentcloud/sms": "^3.0",
|
"tencentcloud/sms": "^3.0",
|
||||||
"alipaysdk/easysdk": "^2.2"
|
"alipaysdk/easysdk": "^2.2"
|
||||||
},
|
},
|
||||||
|
|||||||
1588
composer.lock
generated
1588
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
301
vendor/aliyuncs/oss-sdk-php/CHANGELOG.md
vendored
Executable file → Normal file
301
vendor/aliyuncs/oss-sdk-php/CHANGELOG.md
vendored
Executable file → Normal file
@ -1,142 +1,159 @@
|
|||||||
# ChangeLog - Aliyun OSS SDK for PHP
|
# ChangeLog - Aliyun OSS SDK for PHP
|
||||||
|
|
||||||
## v2.6.0 / 2022-08-03
|
## v2.7.2 / 2024-10-28
|
||||||
* Added: support credentials provider.
|
* Added: presign supports response-* parameters
|
||||||
* Fixed: compatible with swoole curl handler.
|
* Added: forcePathStyle option.
|
||||||
* Added: support more bucket stat info.
|
|
||||||
|
## v2.7.1 / 2024-02-28
|
||||||
## v2.5.0 / 2022-05-13
|
* Fixed: fix deprecated
|
||||||
* Added: support bucket transfer acceleration.
|
|
||||||
* Added: support bucket cname token.
|
## v2.7.0 / 2024-02-02
|
||||||
* Added: support listobjectsV2.
|
* Added: support signature version 4.
|
||||||
|
* Added: support checkObjectEndcoding option.
|
||||||
## v2.4.3 / 2021-08-25
|
* Added: support strictObjectName option.
|
||||||
* Fixed: integer overflow in PHP5.x.
|
* Added: support filePathCompatible option.
|
||||||
|
* Added: support path style.
|
||||||
## v2.4.2 / 2021-06-04
|
* Added: support environment variables credentials provider.
|
||||||
* Compatible with PHP8.
|
* Update: add filed for some api.
|
||||||
* Fixed: compatible with PHP5.4.
|
* Fixed: fix some bugs.
|
||||||
* Fixed: the signature is incorrect in some scenarios
|
|
||||||
* Update: change $requestUrl from a member variable to a local variable.
|
## v2.6.0 / 2022-08-03
|
||||||
|
* Added: support credentials provider.
|
||||||
## v2.4.1 / 2020-09-29
|
* Fixed: compatible with swoole curl handler.
|
||||||
* Fixed: the getBucketPolicy bug.
|
* Added: support more bucket stat info.
|
||||||
|
|
||||||
|
## v2.5.0 / 2022-05-13
|
||||||
## v2.4.0 / 2020-08-31
|
* Added: support bucket transfer acceleration.
|
||||||
|
* Added: support bucket cname token.
|
||||||
* Added: disable Expect: 100-continue
|
* Added: support listobjectsV2.
|
||||||
* Added: support getBucketInfo
|
|
||||||
* Added: support getBucketStat
|
## v2.4.3 / 2021-08-25
|
||||||
* Added: support bucket policy
|
* Fixed: integer overflow in PHP5.x.
|
||||||
* Added: support bucket encryption
|
|
||||||
* Added: support bucket tagging
|
## v2.4.2 / 2021-06-04
|
||||||
* Added: support bucket worm
|
* Compatible with PHP8.
|
||||||
* Added: support versioning
|
* Fixed: compatible with PHP5.4.
|
||||||
* Added: support request payment
|
* Fixed: the signature is incorrect in some scenarios
|
||||||
* Added: support object tagging
|
* Update: change $requestUrl from a member variable to a local variable.
|
||||||
* Added: support code archive
|
|
||||||
* Added: support process object
|
## v2.4.1 / 2020-09-29
|
||||||
* Added: support traffic limit paramter
|
* Fixed: the getBucketPolicy bug.
|
||||||
* Added: support upload object from file handle
|
|
||||||
* Added: support getSimplifiedObjectMeta
|
|
||||||
* Fixed: the object name can not be '0' stirng.
|
## v2.4.0 / 2020-08-31
|
||||||
* Update: endpoint validity check
|
|
||||||
* Update: add new pre-signed url api
|
* Added: disable Expect: 100-continue
|
||||||
|
* Added: support getBucketInfo
|
||||||
|
* Added: support getBucketStat
|
||||||
## v2.3.1 / 2019-01-15
|
* Added: support bucket policy
|
||||||
|
* Added: support bucket encryption
|
||||||
* translate chinese comments into english
|
* Added: support bucket tagging
|
||||||
* Added: endpoint validity check
|
* Added: support bucket worm
|
||||||
|
* Added: support versioning
|
||||||
## v2.3.0 / 2018-01-05
|
* Added: support request payment
|
||||||
|
* Added: support object tagging
|
||||||
* Fixed: putObject support creating empty files
|
* Added: support code archive
|
||||||
* Fixed: createBucket support IA/Archive
|
* Added: support process object
|
||||||
* Added: support restoreObject
|
* Added: support traffic limit paramter
|
||||||
* Added: support the Symlink feature
|
* Added: support upload object from file handle
|
||||||
* Added: support getBucketLocation
|
* Added: support getSimplifiedObjectMeta
|
||||||
* Added: support getBucketMeta
|
* Fixed: the object name can not be '0' stirng.
|
||||||
* Added: support proxy server Proxy
|
* Update: endpoint validity check
|
||||||
|
* Update: add new pre-signed url api
|
||||||
## v2.2.4 / 2017-04-25
|
|
||||||
|
|
||||||
* Fixed getObject to local file bug
|
## v2.3.1 / 2019-01-15
|
||||||
|
|
||||||
## v2.2.3 / 2017-04-14
|
* translate chinese comments into english
|
||||||
|
* Added: endpoint validity check
|
||||||
* Fixed md5 check
|
|
||||||
|
## v2.3.0 / 2018-01-05
|
||||||
## v2.2.2 / 2017-01-18
|
|
||||||
|
* Fixed: putObject support creating empty files
|
||||||
* Resolve to run the connection number and memory bug on php7
|
* Fixed: createBucket support IA/Archive
|
||||||
|
* Added: support restoreObject
|
||||||
## v2.2.1 / 2016-12-01
|
* Added: support the Symlink feature
|
||||||
|
* Added: support getBucketLocation
|
||||||
* No HTTP curl is allowed to automatically populate accept-encoding
|
* Added: support getBucketMeta
|
||||||
|
* Added: support proxy server Proxy
|
||||||
## v2.2.0 / 2016-11-22
|
|
||||||
|
## v2.2.4 / 2017-04-25
|
||||||
* Fixed PutObject/CompleteMultipartUpload return values(#26)
|
|
||||||
|
* Fixed getObject to local file bug
|
||||||
## v2.1.0 / 2016-11-12
|
|
||||||
|
## v2.2.3 / 2017-04-14
|
||||||
* Added[RTMP](https://help.aliyun.com/document_detail/44297.html)interface
|
|
||||||
* Add support[image service](https://help.aliyun.com/document_detail/44686.html)
|
* Fixed md5 check
|
||||||
|
|
||||||
## v2.0.7 / 2016-06-17
|
## v2.2.2 / 2017-01-18
|
||||||
|
|
||||||
* Support append object
|
* Resolve to run the connection number and memory bug on php7
|
||||||
|
|
||||||
## v2.0.6
|
## v2.2.1 / 2016-12-01
|
||||||
|
|
||||||
* Trim access key id/secret and endpoint
|
* No HTTP curl is allowed to automatically populate accept-encoding
|
||||||
* Refine tests and setup travis CI
|
|
||||||
|
## v2.2.0 / 2016-11-22
|
||||||
## v2.0.5
|
|
||||||
|
* Fixed PutObject/CompleteMultipartUpload return values(#26)
|
||||||
* Added Add/Delete/Get BucketCname interface
|
|
||||||
|
## v2.1.0 / 2016-11-12
|
||||||
## v2.0.4
|
|
||||||
|
* Added[RTMP](https://help.aliyun.com/document_detail/44297.html)interface
|
||||||
* Added Put/Get Object Acl interface
|
* Add support[image service](https://help.aliyun.com/document_detail/44686.html)
|
||||||
|
|
||||||
## v2.0.3
|
## v2.0.7 / 2016-06-17
|
||||||
|
|
||||||
* Fixing the constants in Util is defined in a PHP version that is less than 5.6.
|
* Support append object
|
||||||
|
|
||||||
## v2.0.2
|
## v2.0.6
|
||||||
|
|
||||||
* The problem of content-type cannot be specified when restoring multipart uploads
|
* Trim access key id/secret and endpoint
|
||||||
|
* Refine tests and setup travis CI
|
||||||
## v2.0.1
|
|
||||||
|
## v2.0.5
|
||||||
* Increase the ListObjects/ListMultipartUploads special characters
|
|
||||||
* Provides the interface to get the details of the OssException
|
* Added Add/Delete/Get BucketCname interface
|
||||||
|
|
||||||
|
## v2.0.4
|
||||||
## 2015.11.25
|
|
||||||
|
* Added Put/Get Object Acl interface
|
||||||
* **Large version upgrade, no longer compatible with previous interface, new version has made great improvements to ease of use, suggesting that users migrate to a new version.**
|
|
||||||
|
## v2.0.3
|
||||||
## Modify the content
|
|
||||||
|
* Fixing the constants in Util is defined in a PHP version that is less than 5.6.
|
||||||
* PHP 5.2 is no longer supported
|
|
||||||
|
## v2.0.2
|
||||||
### Add the cotent
|
|
||||||
|
* The problem of content-type cannot be specified when restoring multipart uploads
|
||||||
* Introduce namespace
|
|
||||||
* Interface naming and modification, using hump naming
|
## v2.0.1
|
||||||
* The interface is modified, and the common parameters are extracted from the Options parameter.
|
|
||||||
* The interface returns the result modification, processing the return result, and the user can directly get the data structure easily processed
|
* Increase the ListObjects/ListMultipartUploads special characters
|
||||||
* OssClient's constructor changes
|
* Provides the interface to get the details of the OssException
|
||||||
* The Endpoint address that support CNAME and IP formats
|
|
||||||
* Rearrange the sample file organization structure and use function to organize the function points
|
|
||||||
* Add an interface that sets the connection timeout and requests timeout
|
## 2015.11.25
|
||||||
* Remove the outdated interface associated with the Object Group
|
|
||||||
* The message in the OssException is changed to English
|
* **Large version upgrade, no longer compatible with previous interface, new version has made great improvements to ease of use, suggesting that users migrate to a new version.**
|
||||||
|
|
||||||
### Repair problem
|
## Modify the content
|
||||||
|
|
||||||
* The object name is not complete
|
* PHP 5.2 is no longer supported
|
||||||
|
|
||||||
|
### Add the cotent
|
||||||
|
|
||||||
|
* Introduce namespace
|
||||||
|
* Interface naming and modification, using hump naming
|
||||||
|
* The interface is modified, and the common parameters are extracted from the Options parameter.
|
||||||
|
* The interface returns the result modification, processing the return result, and the user can directly get the data structure easily processed
|
||||||
|
* OssClient's constructor changes
|
||||||
|
* The Endpoint address that support CNAME and IP formats
|
||||||
|
* Rearrange the sample file organization structure and use function to organize the function points
|
||||||
|
* Add an interface that sets the connection timeout and requests timeout
|
||||||
|
* Remove the outdated interface associated with the Object Group
|
||||||
|
* The message in the OssException is changed to English
|
||||||
|
|
||||||
|
### Repair problem
|
||||||
|
|
||||||
|
* The object name is not complete
|
||||||
|
|||||||
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
300
vendor/aliyuncs/oss-sdk-php/README.md
vendored
Executable file → Normal file
300
vendor/aliyuncs/oss-sdk-php/README.md
vendored
Executable file → Normal file
@ -1,150 +1,150 @@
|
|||||||
# Alibaba Cloud OSS SDK for PHP
|
# Alibaba Cloud OSS SDK for PHP
|
||||||
|
|
||||||
[](https://packagist.org/packages/aliyuncs/oss-sdk-php)
|
[](https://packagist.org/packages/aliyuncs/oss-sdk-php)
|
||||||
[](https://travis-ci.org/aliyun/aliyun-oss-php-sdk)
|
[](https://travis-ci.org/aliyun/aliyun-oss-php-sdk)
|
||||||
[](https://coveralls.io/github/aliyun/aliyun-oss-php-sdk?branch=master)
|
[](https://coveralls.io/github/aliyun/aliyun-oss-php-sdk?branch=master)
|
||||||
|
|
||||||
## [README of Chinese](https://github.com/aliyun/aliyun-oss-php-sdk/blob/master/README-CN.md)
|
## [README of Chinese](https://github.com/aliyun/aliyun-oss-php-sdk/blob/master/README-CN.md)
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
Alibaba Cloud Object Storage Service (OSS) is a cloud storage service provided by Alibaba Cloud, featuring a massive capacity, security, a low cost, and high reliability. You can upload and download data on any application anytime and anywhere by calling APIs, and perform simple management of data through the web console. The OSS can store any type of files and therefore applies to various websites, development enterprises and developers.
|
Alibaba Cloud Object Storage Service (OSS) is a cloud storage service provided by Alibaba Cloud, featuring a massive capacity, security, a low cost, and high reliability. You can upload and download data on any application anytime and anywhere by calling APIs, and perform simple management of data through the web console. The OSS can store any type of files and therefore applies to various websites, development enterprises and developers.
|
||||||
|
|
||||||
|
|
||||||
## Run environment
|
## Run environment
|
||||||
- PHP 5.3+.
|
- PHP 5.3+.
|
||||||
- cURL extension.
|
- cURL extension.
|
||||||
|
|
||||||
Tips:
|
Tips:
|
||||||
|
|
||||||
- In Ubuntu, you can use the ***apt-get*** package manager to install the *PHP cURL extension*: `sudo apt-get install php5-curl`.
|
- In Ubuntu, you can use the ***apt-get*** package manager to install the *PHP cURL extension*: `sudo apt-get install php5-curl`.
|
||||||
|
|
||||||
## Install OSS PHP SDK
|
## Install OSS PHP SDK
|
||||||
|
|
||||||
- If you use the ***composer*** to manage project dependencies, run the following command in your project's root directory:
|
- If you use the ***composer*** to manage project dependencies, run the following command in your project's root directory:
|
||||||
|
|
||||||
composer require aliyuncs/oss-sdk-php
|
composer require aliyuncs/oss-sdk-php
|
||||||
|
|
||||||
You can also declare the dependency on Alibaba Cloud OSS SDK for PHP in the `composer.json` file.
|
You can also declare the dependency on Alibaba Cloud OSS SDK for PHP in the `composer.json` file.
|
||||||
|
|
||||||
"require": {
|
"require": {
|
||||||
"aliyuncs/oss-sdk-php": "~2.0"
|
"aliyuncs/oss-sdk-php": "~2.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
Then run `composer install` to install the dependency. After the Composer Dependency Manager is installed, import the dependency in your PHP code:
|
Then run `composer install` to install the dependency. After the Composer Dependency Manager is installed, import the dependency in your PHP code:
|
||||||
|
|
||||||
require_once __DIR__ . '/vendor/autoload.php';
|
require_once __DIR__ . '/vendor/autoload.php';
|
||||||
|
|
||||||
- You can also directly download the packaged [PHAR File][releases-page], and
|
- You can also directly download the packaged [PHAR File][releases-page], and
|
||||||
introduce the file to your code:
|
introduce the file to your code:
|
||||||
|
|
||||||
require_once '/path/to/oss-sdk-php.phar';
|
require_once '/path/to/oss-sdk-php.phar';
|
||||||
|
|
||||||
- Download the SDK source code, and introduce the `autoload.php` file under the SDK directory to your code:
|
- Download the SDK source code, and introduce the `autoload.php` file under the SDK directory to your code:
|
||||||
|
|
||||||
require_once '/path/to/oss-sdk/autoload.php';
|
require_once '/path/to/oss-sdk/autoload.php';
|
||||||
|
|
||||||
## Quick use
|
## Quick use
|
||||||
|
|
||||||
### Common classes
|
### Common classes
|
||||||
|
|
||||||
| Class | Explanation |
|
| Class | Explanation |
|
||||||
|:------------------|:------------------------------------|
|
|:------------------|:------------------------------------|
|
||||||
|OSS\OssClient | OSS client class. An OssClient instance can be used to call the interface. |
|
|OSS\OssClient | OSS client class. An OssClient instance can be used to call the interface. |
|
||||||
|OSS\Core\OssException |OSS Exception class . You only need to pay attention to this exception when you use the OssClient. |
|
|OSS\Core\OssException |OSS Exception class . You only need to pay attention to this exception when you use the OssClient. |
|
||||||
|
|
||||||
### Initialize an OssClient
|
### Initialize an OssClient
|
||||||
|
|
||||||
The SDK's operations for the OSS are performed through the OssClient class. The code below creates an OssClient object:
|
The SDK's operations for the OSS are performed through the OssClient class. The code below creates an OssClient object:
|
||||||
|
|
||||||
```php
|
```php
|
||||||
<?php
|
<?php
|
||||||
$accessKeyId = "<AccessKeyID that you obtain from OSS>";
|
$accessKeyId = "<AccessKeyID that you obtain from OSS>";
|
||||||
$accessKeySecret = "<AccessKeySecret that you obtain from OSS>";
|
$accessKeySecret = "<AccessKeySecret that you obtain from OSS>";
|
||||||
$endpoint = "<Domain that you select to access an OSS data center, such as "oss-cn-hangzhou.aliyuncs.com>";
|
$endpoint = "<Domain that you select to access an OSS data center, such as "oss-cn-hangzhou.aliyuncs.com>";
|
||||||
try {
|
try {
|
||||||
$ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint);
|
$ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint);
|
||||||
} catch (OssException $e) {
|
} catch (OssException $e) {
|
||||||
print $e->getMessage();
|
print $e->getMessage();
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Operations on objects
|
### Operations on objects
|
||||||
|
|
||||||
Objects are the most basic data units on the OSS. You can simply consider objects as files. The following code uploads an object:
|
Objects are the most basic data units on the OSS. You can simply consider objects as files. The following code uploads an object:
|
||||||
|
|
||||||
```php
|
```php
|
||||||
<?php
|
<?php
|
||||||
$bucket= "<Name of the bucket in use. Pay attention to naming conventions>";
|
$bucket= "<Name of the bucket in use. Pay attention to naming conventions>";
|
||||||
$object = "<Name of the object in use. Pay attention to naming conventions>";
|
$object = "<Name of the object in use. Pay attention to naming conventions>";
|
||||||
$content = "Hello, OSS!"; // Content of the uploaded file
|
$content = "Hello, OSS!"; // Content of the uploaded file
|
||||||
try {
|
try {
|
||||||
$ossClient->putObject($bucket, $object, $content);
|
$ossClient->putObject($bucket, $object, $content);
|
||||||
} catch (OssException $e) {
|
} catch (OssException $e) {
|
||||||
print $e->getMessage();
|
print $e->getMessage();
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Operations on buckets
|
### Operations on buckets
|
||||||
|
|
||||||
Buckets are the space that you use to manage the stored objects. It is an object management unit for users. Each object must belong to a bucket. You can create a bucket with the following code:
|
Buckets are the space that you use to manage the stored objects. It is an object management unit for users. Each object must belong to a bucket. You can create a bucket with the following code:
|
||||||
|
|
||||||
```php
|
```php
|
||||||
<?php
|
<?php
|
||||||
$bucket= "<Name of the bucket in use. Pay attention to naming conventions>";
|
$bucket= "<Name of the bucket in use. Pay attention to naming conventions>";
|
||||||
try {
|
try {
|
||||||
$ossClient->createBucket($bucket);
|
$ossClient->createBucket($bucket);
|
||||||
} catch (OssException $e) {
|
} catch (OssException $e) {
|
||||||
print $e->getMessage();
|
print $e->getMessage();
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Handle returned results
|
### Handle returned results
|
||||||
|
|
||||||
The OssClient provides the following two types of returned data from interfaces:
|
The OssClient provides the following two types of returned data from interfaces:
|
||||||
|
|
||||||
- Put and Delete interfaces: The *PUT* and *DELETE* operations are deemed successful if *null* is returned by the interfaces without *OSSException*.
|
- Put and Delete interfaces: The *PUT* and *DELETE* operations are deemed successful if *null* is returned by the interfaces without *OSSException*.
|
||||||
- Get and List interfaces: The *GET* and *LIST* operations are deemed successful if the desired data is returned by the interfaces without *OSSException*. For example,
|
- Get and List interfaces: The *GET* and *LIST* operations are deemed successful if the desired data is returned by the interfaces without *OSSException*. For example,
|
||||||
|
|
||||||
```php
|
```php
|
||||||
<?php
|
<?php
|
||||||
$bucketListInfo = $ossClient->listBuckets();
|
$bucketListInfo = $ossClient->listBuckets();
|
||||||
$bucketList = $bucketListInfo->getBucketList();
|
$bucketList = $bucketListInfo->getBucketList();
|
||||||
foreach($bucketList as $bucket) {
|
foreach($bucketList as $bucket) {
|
||||||
print($bucket->getLocation() . "\t" . $bucket->getName() . "\t" . $bucket->getCreateDate() . "\n");
|
print($bucket->getLocation() . "\t" . $bucket->getName() . "\t" . $bucket->getCreateDate() . "\n");
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
In the above code, $bucketListInfo falls into the 'OSS\Model\BucketListInfo' data type.
|
In the above code, $bucketListInfo falls into the 'OSS\Model\BucketListInfo' data type.
|
||||||
|
|
||||||
|
|
||||||
### Run a sample project
|
### Run a sample project
|
||||||
|
|
||||||
- Modify `samples/Config.php` to complete the configuration information.
|
- Modify `samples/Config.php` to complete the configuration information.
|
||||||
- Run `cd samples/ && php RunAll.php`.
|
- Run `cd samples/ && php RunAll.php`.
|
||||||
|
|
||||||
### Run a unit test
|
### Run a unit test
|
||||||
|
|
||||||
- Run `composer install` to download the dependent libraries.
|
- Run `composer install` to download the dependent libraries.
|
||||||
- Set the environment variable.
|
- Set the environment variable.
|
||||||
|
|
||||||
export OSS_ACCESS_KEY_ID=access-key-id
|
export OSS_ACCESS_KEY_ID=access-key-id
|
||||||
export OSS_ACCESS_KEY_SECRET=access-key-secret
|
export OSS_ACCESS_KEY_SECRET=access-key-secret
|
||||||
export OSS_ENDPOINT=endpoint
|
export OSS_ENDPOINT=endpoint
|
||||||
export OSS_BUCKET=bucket-name
|
export OSS_BUCKET=bucket-name
|
||||||
|
|
||||||
- Run `php vendor/bin/phpunit`
|
- Run `php vendor/bin/phpunit`
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
- MIT
|
- MIT
|
||||||
|
|
||||||
## Contact us
|
## Contact us
|
||||||
|
|
||||||
- [Alibaba Cloud OSS official website](http://oss.aliyun.com).
|
- [Alibaba Cloud OSS official website](http://oss.aliyun.com).
|
||||||
- [Alibaba Cloud OSS official forum](http://bbs.aliyun.com).
|
- [Alibaba Cloud OSS official forum](http://bbs.aliyun.com).
|
||||||
- [Alibaba Cloud OSS official documentation center](http://www.aliyun.com/product/oss#Docs).
|
- [Alibaba Cloud OSS official documentation center](http://www.aliyun.com/product/oss#Docs).
|
||||||
- Alibaba Cloud official technical support: [Submit a ticket](https://workorder.console.aliyun.com/#/ticket/createIndex).
|
- Alibaba Cloud official technical support: [Submit a ticket](https://workorder.console.aliyun.com/#/ticket/createIndex).
|
||||||
|
|
||||||
[releases-page]: https://github.com/aliyun/aliyun-oss-php-sdk/releases
|
[releases-page]: https://github.com/aliyun/aliyun-oss-php-sdk/releases
|
||||||
[phar-composer]: https://github.com/clue/phar-composer
|
[phar-composer]: https://github.com/clue/phar-composer
|
||||||
|
|
||||||
|
|||||||
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" : {
|
"require-dev" : {
|
||||||
"phpunit/phpunit": "*",
|
"phpunit/phpunit": "*",
|
||||||
"satooshi/php-coveralls": "*"
|
"php-coveralls/php-coveralls": "*"
|
||||||
},
|
},
|
||||||
"minimum-stability": "stable",
|
"minimum-stability": "stable",
|
||||||
"autoload": {
|
"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
|
// Get cors configuration
|
||||||
$corsConfig = $ossClient->getBucketCors($bucket);
|
$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
|
// Delete cors configuration
|
||||||
$ossClient->deleteBucketCors($bucket);
|
$ossClient->deleteBucketCors($bucket);
|
||||||
@ -78,13 +110,44 @@ function getBucketCors($ossClient, $bucket)
|
|||||||
$corsConfig = null;
|
$corsConfig = null;
|
||||||
try {
|
try {
|
||||||
$corsConfig = $ossClient->getBucketCors($bucket);
|
$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) {
|
} catch (OssException $e) {
|
||||||
printf(__FUNCTION__ . ": FAILED\n");
|
printf(__FUNCTION__ . ": FAILED\n");
|
||||||
printf($e->getMessage() . "\n");
|
printf($e->getMessage() . "\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
print(__FUNCTION__ . ": OK" . "\n");
|
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\OssClient;
|
||||||
use OSS\Core\OssException;
|
use OSS\Core\OssException;
|
||||||
use OSS\Credentials\StaticCredentialsProvider;
|
use OSS\Credentials\StaticCredentialsProvider;
|
||||||
|
use OSS\Credentials\EnvironmentVariableCredentialsProvider;
|
||||||
$bucket = Common::getBucketName();
|
$bucket = Common::getBucketName();
|
||||||
|
|
||||||
// Access Key Provider demo
|
// Access Key Provider demo
|
||||||
@ -43,3 +44,20 @@ try {
|
|||||||
printf($e->getMessage() . "\n");
|
printf($e->getMessage() . "\n");
|
||||||
return;
|
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
270
vendor/aliyuncs/oss-sdk-php/samples/Object.php
vendored
Executable file → Normal file
270
vendor/aliyuncs/oss-sdk-php/samples/Object.php
vendored
Executable file → Normal file
@ -55,7 +55,7 @@ $day = 3;
|
|||||||
$tier = 'Expedited';
|
$tier = 'Expedited';
|
||||||
$config = new RestoreConfig($day,$tier);
|
$config = new RestoreConfig($day,$tier);
|
||||||
$options = array(
|
$options = array(
|
||||||
OssClient::OSS_RESTORE_CONFIG => $config
|
OssClient::OSS_RESTORE_CONFIG => $config
|
||||||
);
|
);
|
||||||
$ossClient->restoreObject($bucket, 'b.file',$options);
|
$ossClient->restoreObject($bucket, 'b.file',$options);
|
||||||
|
|
||||||
@ -93,9 +93,9 @@ $content = "hello world";
|
|||||||
|
|
||||||
// The speed limit is 100 KB/s, which is 819200 bit/s.
|
// The speed limit is 100 KB/s, which is 819200 bit/s.
|
||||||
$options = array(
|
$options = array(
|
||||||
OssClient::OSS_HEADERS => array(
|
OssClient::OSS_HEADERS => array(
|
||||||
OssClient::OSS_TRAFFIC_LIMIT => 819200,
|
OssClient::OSS_TRAFFIC_LIMIT => 819200,
|
||||||
));
|
));
|
||||||
// Speed limit upload.
|
// Speed limit upload.
|
||||||
$ossClient->putObject($bucket, $object, $content, $options);
|
$ossClient->putObject($bucket, $object, $content, $options);
|
||||||
|
|
||||||
@ -205,7 +205,7 @@ function uploadFile($ossClient, $bucket)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Lists all files and folders in the bucket.
|
* Lists all files and folders in the bucket.
|
||||||
* Note if there's more items than the max-keys specified, the caller needs to use the nextMarker returned as the value for the next call's maker paramter.
|
* Note if there's more items than the max-keys specified, the caller needs to use the nextMarker returned as the value for the next call's maker paramter.
|
||||||
* Loop through all the items returned from ListObjects.
|
* Loop through all the items returned from ListObjects.
|
||||||
*
|
*
|
||||||
@ -227,30 +227,47 @@ function listObjects($ossClient, $bucket)
|
|||||||
);
|
);
|
||||||
try {
|
try {
|
||||||
$listObjectInfo = $ossClient->listObjects($bucket, $options);
|
$listObjectInfo = $ossClient->listObjects($bucket, $options);
|
||||||
|
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) {
|
||||||
|
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) {
|
||||||
|
printf("Common Prefix:%s\n",$prefixInfo->getPrefix());
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (OssException $e) {
|
} catch (OssException $e) {
|
||||||
printf(__FUNCTION__ . ": FAILED\n");
|
printf(__FUNCTION__ . ": FAILED\n");
|
||||||
printf($e->getMessage() . "\n");
|
printf($e->getMessage() . "\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
print(__FUNCTION__ . ": OK" . "\n");
|
print(__FUNCTION__ . ": OK" . "\n");
|
||||||
$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");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!empty($prefixList)) {
|
|
||||||
print("prefixList: \n");
|
|
||||||
foreach ($prefixList as $prefixInfo) {
|
|
||||||
print($prefixInfo->getPrefix() . "\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -264,42 +281,61 @@ function listObjects($ossClient, $bucket)
|
|||||||
*/
|
*/
|
||||||
function listObjectsV2($ossClient, $bucket)
|
function listObjectsV2($ossClient, $bucket)
|
||||||
{
|
{
|
||||||
$prefix = 'oss-php-sdk-test/';
|
$prefix = 'oss-php-sdk-test/';
|
||||||
$delimiter = '/';
|
$delimiter = '/';
|
||||||
$maxkeys = 1000;
|
$maxkeys = 1000;
|
||||||
$options = array(
|
$options = array(
|
||||||
'delimiter' => $delimiter,
|
'delimiter' => $delimiter,
|
||||||
'prefix' => $prefix,
|
'prefix' => $prefix,
|
||||||
'max-keys' => $maxkeys,
|
'max-keys' => $maxkeys,
|
||||||
'start-after' =>'test-object',
|
'start-after' =>'test-object',
|
||||||
'fetch-owner' =>'true',
|
'fetch-owner' =>'true',
|
||||||
);
|
);
|
||||||
try {
|
try {
|
||||||
$listObjectInfo = $ossClient->listObjectsV2($bucket, $options);
|
$listObjectInfo = $ossClient->listObjectsV2($bucket, $options);
|
||||||
} catch (OssException $e) {
|
printf("Bucket Name: %s". "\n",$listObjectInfo->getBucketName());
|
||||||
printf(__FUNCTION__ . ": FAILED\n");
|
printf("Prefix: %s". "\n",$listObjectInfo->getPrefix());
|
||||||
printf($e->getMessage() . "\n");
|
printf("Next Continuation Token: %s". "\n",$listObjectInfo->getNextContinuationToken());
|
||||||
return;
|
printf("Continuation Token: %s". "\n",$listObjectInfo->getContinuationToken());
|
||||||
}
|
printf("Max Keys: %s". "\n",$listObjectInfo->getMaxKeys());
|
||||||
print(__FUNCTION__ . ": OK" . "\n");
|
printf("Key Count: %s". "\n",$listObjectInfo->getKeyCount());
|
||||||
$objectList = $listObjectInfo->getObjectList(); // object list
|
printf("Delimiter: %s". "\n",$listObjectInfo->getDelimiter());
|
||||||
$prefixList = $listObjectInfo->getPrefixList(); // directory list
|
printf("Is Truncated: %s". "\n",$listObjectInfo->getIsTruncated());
|
||||||
if (!empty($objectList)) {
|
printf("Start After: %s". "\n",$listObjectInfo->getStartAfter());
|
||||||
print("objectList:\n");
|
$objectList = $listObjectInfo->getObjectList(); // object list
|
||||||
foreach ($objectList as $objectInfo) {
|
$prefixList = $listObjectInfo->getPrefixList(); // directory list
|
||||||
print($objectInfo->getKey() . "\n");
|
if (!empty($objectList)) {
|
||||||
if($objectInfo->getOwner() != null){
|
print("objectList:\n");
|
||||||
printf("owner id:".$objectInfo->getOwner()->getId() . "\n");
|
foreach ($objectList as $objectInfo) {
|
||||||
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());
|
||||||
if (!empty($prefixList)) {
|
printf("Object Last Modified: %s". "\n",$objectInfo->getLastModified());
|
||||||
print("prefixList: \n");
|
printf("Object Storage Class: %s". "\n",$objectInfo->getStorageClass());
|
||||||
foreach ($prefixList as $prefixInfo) {
|
|
||||||
print($prefixInfo->getPrefix() . "\n");
|
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) {
|
||||||
|
printf("Common Prefix:%s\n",$prefixInfo->getPrefix());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (OssException $e) {
|
||||||
|
printf(__FUNCTION__ . ": FAILED\n");
|
||||||
|
printf($e->getMessage() . "\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
print(__FUNCTION__ . ": OK" . "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -623,20 +659,20 @@ function doesObjectExist($ossClient, $bucket)
|
|||||||
*/
|
*/
|
||||||
function putObjectSpeed($ossClient, $bucket)
|
function putObjectSpeed($ossClient, $bucket)
|
||||||
{
|
{
|
||||||
$object = "upload-test-object-name.txt";
|
$object = "upload-test-object-name.txt";
|
||||||
$content = file_get_contents(__FILE__);
|
$content = file_get_contents(__FILE__);
|
||||||
$options = array(
|
$options = array(
|
||||||
OssClient::OSS_HEADERS => array(
|
OssClient::OSS_HEADERS => array(
|
||||||
OssClient::OSS_TRAFFIC_LIMIT => 819200,
|
OssClient::OSS_TRAFFIC_LIMIT => 819200,
|
||||||
));
|
));
|
||||||
try {
|
try {
|
||||||
$ossClient->putObject($bucket, $object, $content, $options);
|
$ossClient->putObject($bucket, $object, $content, $options);
|
||||||
} catch (OssException $e) {
|
} catch (OssException $e) {
|
||||||
printf(__FUNCTION__ . ": FAILED\n");
|
printf(__FUNCTION__ . ": FAILED\n");
|
||||||
printf($e->getMessage() . "\n");
|
printf($e->getMessage() . "\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
print(__FUNCTION__ . ": OK" . "\n");
|
print(__FUNCTION__ . ": OK" . "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -648,19 +684,19 @@ function putObjectSpeed($ossClient, $bucket)
|
|||||||
*/
|
*/
|
||||||
function getObjectSpeed($ossClient, $bucket)
|
function getObjectSpeed($ossClient, $bucket)
|
||||||
{
|
{
|
||||||
$object = "upload-test-object-name.txt";
|
$object = "upload-test-object-name.txt";
|
||||||
$options = array(
|
$options = array(
|
||||||
OssClient::OSS_HEADERS => array(
|
OssClient::OSS_HEADERS => array(
|
||||||
OssClient::OSS_TRAFFIC_LIMIT => 819200,
|
OssClient::OSS_TRAFFIC_LIMIT => 819200,
|
||||||
));
|
));
|
||||||
try {
|
try {
|
||||||
$ossClient->getObject($bucket, $object, $options);
|
$ossClient->getObject($bucket, $object, $options);
|
||||||
} catch (OssException $e) {
|
} catch (OssException $e) {
|
||||||
printf(__FUNCTION__ . ": FAILED\n");
|
printf(__FUNCTION__ . ": FAILED\n");
|
||||||
printf($e->getMessage() . "\n");
|
printf($e->getMessage() . "\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
print(__FUNCTION__ . ": OK" . "\n");
|
print(__FUNCTION__ . ": OK" . "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -672,14 +708,14 @@ function getObjectSpeed($ossClient, $bucket)
|
|||||||
*/
|
*/
|
||||||
function signUrlSpeedUpload($ossClient, $bucket)
|
function signUrlSpeedUpload($ossClient, $bucket)
|
||||||
{
|
{
|
||||||
$object = "upload-test-object-name.txt";
|
$object = "upload-test-object-name.txt";
|
||||||
$timeout = 120;
|
$timeout = 120;
|
||||||
$options = array(
|
$options = array(
|
||||||
OssClient::OSS_TRAFFIC_LIMIT => 819200,
|
OssClient::OSS_TRAFFIC_LIMIT => 819200,
|
||||||
);
|
);
|
||||||
$timeout = 60;
|
$timeout = 60;
|
||||||
$signedUrl = $ossClient->signUrl($bucket, $object, $timeout, "PUT", $options);
|
$signedUrl = $ossClient->signUrl($bucket, $object, $timeout, "PUT", $options);
|
||||||
print($signedUrl);
|
print($signedUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -692,14 +728,14 @@ function signUrlSpeedUpload($ossClient, $bucket)
|
|||||||
*/
|
*/
|
||||||
function signUrlSpeedDownload($ossClient, $bucket)
|
function signUrlSpeedDownload($ossClient, $bucket)
|
||||||
{
|
{
|
||||||
$object = "upload-test-object-name.txt";
|
$object = "upload-test-object-name.txt";
|
||||||
$timeout = 120;
|
$timeout = 120;
|
||||||
$options = array(
|
$options = array(
|
||||||
OssClient::OSS_TRAFFIC_LIMIT => 819200,
|
OssClient::OSS_TRAFFIC_LIMIT => 819200,
|
||||||
);
|
);
|
||||||
$signedUrl = $ossClient->signUrl($bucket, $object, $timeout, "GET", $options);
|
$signedUrl = $ossClient->signUrl($bucket, $object, $timeout, "GET", $options);
|
||||||
print($signedUrl);
|
print($signedUrl);
|
||||||
print(__FUNCTION__ . ": OK" . "\n");
|
print(__FUNCTION__ . ": OK" . "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -711,19 +747,19 @@ function signUrlSpeedDownload($ossClient, $bucket)
|
|||||||
*/
|
*/
|
||||||
function restoreObject($ossClient, $bucket)
|
function restoreObject($ossClient, $bucket)
|
||||||
{
|
{
|
||||||
$object = "oss-php-sdk-test/upload-test-object-name.txt";
|
$object = "oss-php-sdk-test/upload-test-object-name.txt";
|
||||||
$day = 3;
|
$day = 3;
|
||||||
$tier = 'Expedited';
|
$tier = 'Expedited';
|
||||||
$config = new RestoreConfig($day,$tier);
|
$config = new RestoreConfig($day,$tier);
|
||||||
$options = array(
|
$options = array(
|
||||||
OssClient::OSS_RESTORE_CONFIG => $config
|
OssClient::OSS_RESTORE_CONFIG => $config
|
||||||
);
|
);
|
||||||
try {
|
try {
|
||||||
$ossClient->restoreObject($bucket, $object,$options);
|
$ossClient->restoreObject($bucket, $object,$options);
|
||||||
} catch (OssException $e) {
|
} catch (OssException $e) {
|
||||||
printf(__FUNCTION__ . ": FAILED\n");
|
printf(__FUNCTION__ . ": FAILED\n");
|
||||||
printf($e->getMessage() . "\n");
|
printf($e->getMessage() . "\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
print(__FUNCTION__ . ": OK" . "\n");
|
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
1077
vendor/aliyuncs/oss-sdk-php/src/OSS/Core/OssUtil.php
vendored
Executable file → Normal file
1077
vendor/aliyuncs/oss-sdk-php/src/OSS/Core/OssUtil.php
vendored
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
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;
|
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
|
* @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;
|
$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.
|
* Parse CorsConfig from the xml.
|
||||||
*
|
|
||||||
* @param string $strXml
|
* @param string $strXml
|
||||||
* @throws OssException
|
* @throws OssException
|
||||||
* @return null
|
* @return null
|
||||||
@ -56,6 +72,10 @@ class CorsConfig implements XmlConfig
|
|||||||
public function parseFromXml($strXml)
|
public function parseFromXml($strXml)
|
||||||
{
|
{
|
||||||
$xml = simplexml_load_string($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;
|
if (!isset($xml->CORSRule)) return;
|
||||||
foreach ($xml->CORSRule as $rule) {
|
foreach ($xml->CORSRule as $rule) {
|
||||||
$corsRule = new CorsRule();
|
$corsRule = new CorsRule();
|
||||||
@ -74,7 +94,6 @@ class CorsConfig implements XmlConfig
|
|||||||
}
|
}
|
||||||
$this->addRule($corsRule);
|
$this->addRule($corsRule);
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -89,6 +108,13 @@ class CorsConfig implements XmlConfig
|
|||||||
$xmlRule = $xml->addChild('CORSRule');
|
$xmlRule = $xml->addChild('CORSRule');
|
||||||
$rule->appendToXml($xmlRule);
|
$rule->appendToXml($xmlRule);
|
||||||
}
|
}
|
||||||
|
if(isset($this->responseVary)){
|
||||||
|
if ($this->responseVary) {
|
||||||
|
$xml->addChild('ResponseVary', 'true');
|
||||||
|
} else {
|
||||||
|
$xml->addChild('ResponseVary', 'false');
|
||||||
|
}
|
||||||
|
}
|
||||||
return $xml->asXML();
|
return $xml->asXML();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -110,4 +136,5 @@ class CorsConfig implements XmlConfig
|
|||||||
* @var CorsRule[]
|
* @var CorsRule[]
|
||||||
*/
|
*/
|
||||||
private $rules = array();
|
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 $type
|
||||||
* @param string $size
|
* @param string $size
|
||||||
* @param string $storageClass
|
* @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->key = $key;
|
||||||
$this->lastModified = $lastModified;
|
$this->lastModified = $lastModified;
|
||||||
@ -33,6 +35,8 @@ class ObjectInfo
|
|||||||
$this->type = $type;
|
$this->type = $type;
|
||||||
$this->size = $size;
|
$this->size = $size;
|
||||||
$this->storageClass = $storageClass;
|
$this->storageClass = $storageClass;
|
||||||
|
$this->owner = $owner;
|
||||||
|
$this->restoreInfo = $restoreInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -94,10 +98,32 @@ class ObjectInfo
|
|||||||
return $this->storageClass;
|
return $this->storageClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getRestoreInfo()
|
||||||
|
{
|
||||||
|
return $this->restoreInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Owner|null
|
||||||
|
*/
|
||||||
|
public function getOwner()
|
||||||
|
{
|
||||||
|
return $this->owner;
|
||||||
|
}
|
||||||
|
|
||||||
private $key = "";
|
private $key = "";
|
||||||
private $lastModified = "";
|
private $lastModified = "";
|
||||||
private $eTag = "";
|
private $eTag = "";
|
||||||
private $type = "";
|
private $type = "";
|
||||||
private $size = "0";
|
private $size = "0";
|
||||||
private $storageClass = "";
|
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 $nextVersionIdMarker
|
||||||
* @param string $maxKeys
|
* @param string $maxKeys
|
||||||
* @param string $delimiter
|
* @param string $delimiter
|
||||||
* @param null $isTruncated
|
* @param null|string $isTruncated
|
||||||
* @param array $objectversionList
|
* @param array $objectversionList
|
||||||
* @param array $deleteMarkerList
|
* @param array $deleteMarkerList
|
||||||
* @param array $prefixList
|
* @param array $prefixList
|
||||||
@ -151,7 +151,7 @@ class ObjectVersionListInfo
|
|||||||
private $prefix = "";
|
private $prefix = "";
|
||||||
private $keyMarker = "";
|
private $keyMarker = "";
|
||||||
private $nextKeyMarker = "";
|
private $nextKeyMarker = "";
|
||||||
private $versionIdmarker = "";
|
private $versionIdMarker = "";
|
||||||
private $nextVersionIdMarker = "";
|
private $nextVersionIdMarker = "";
|
||||||
private $maxKeys = 0;
|
private $maxKeys = 0;
|
||||||
private $delimiter = "";
|
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
1184
vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php
vendored
Executable file → Normal file
1184
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