提交的内容
This commit is contained in:
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
|
||||
|
||||
## v2.6.0 / 2022-08-03
|
||||
* Added: support credentials provider.
|
||||
* Fixed: compatible with swoole curl handler.
|
||||
* Added: support more bucket stat info.
|
||||
|
||||
## v2.5.0 / 2022-05-13
|
||||
* Added: support bucket transfer acceleration.
|
||||
* Added: support bucket cname token.
|
||||
* Added: support listobjectsV2.
|
||||
|
||||
## v2.4.3 / 2021-08-25
|
||||
* Fixed: integer overflow in PHP5.x.
|
||||
|
||||
## v2.4.2 / 2021-06-04
|
||||
* Compatible with PHP8.
|
||||
* Fixed: compatible with PHP5.4.
|
||||
* Fixed: the signature is incorrect in some scenarios
|
||||
* Update: change $requestUrl from a member variable to a local variable.
|
||||
|
||||
## v2.4.1 / 2020-09-29
|
||||
* Fixed: the getBucketPolicy bug.
|
||||
|
||||
|
||||
## v2.4.0 / 2020-08-31
|
||||
|
||||
* Added: disable Expect: 100-continue
|
||||
* Added: support getBucketInfo
|
||||
* Added: support getBucketStat
|
||||
* Added: support bucket policy
|
||||
* Added: support bucket encryption
|
||||
* Added: support bucket tagging
|
||||
* Added: support bucket worm
|
||||
* Added: support versioning
|
||||
* Added: support request payment
|
||||
* Added: support object tagging
|
||||
* Added: support code archive
|
||||
* Added: support process object
|
||||
* Added: support traffic limit paramter
|
||||
* Added: support upload object from file handle
|
||||
* Added: support getSimplifiedObjectMeta
|
||||
* Fixed: the object name can not be '0' stirng.
|
||||
* Update: endpoint validity check
|
||||
* Update: add new pre-signed url api
|
||||
|
||||
|
||||
## v2.3.1 / 2019-01-15
|
||||
|
||||
* translate chinese comments into english
|
||||
* Added: endpoint validity check
|
||||
|
||||
## v2.3.0 / 2018-01-05
|
||||
|
||||
* Fixed: putObject support creating empty files
|
||||
* Fixed: createBucket support IA/Archive
|
||||
* Added: support restoreObject
|
||||
* Added: support the Symlink feature
|
||||
* Added: support getBucketLocation
|
||||
* Added: support getBucketMeta
|
||||
* Added: support proxy server Proxy
|
||||
|
||||
## v2.2.4 / 2017-04-25
|
||||
|
||||
* Fixed getObject to local file bug
|
||||
|
||||
## v2.2.3 / 2017-04-14
|
||||
|
||||
* Fixed md5 check
|
||||
|
||||
## v2.2.2 / 2017-01-18
|
||||
|
||||
* Resolve to run the connection number and memory bug on php7
|
||||
|
||||
## v2.2.1 / 2016-12-01
|
||||
|
||||
* No HTTP curl is allowed to automatically populate accept-encoding
|
||||
|
||||
## v2.2.0 / 2016-11-22
|
||||
|
||||
* Fixed PutObject/CompleteMultipartUpload return values(#26)
|
||||
|
||||
## v2.1.0 / 2016-11-12
|
||||
|
||||
* Added[RTMP](https://help.aliyun.com/document_detail/44297.html)interface
|
||||
* Add support[image service](https://help.aliyun.com/document_detail/44686.html)
|
||||
|
||||
## v2.0.7 / 2016-06-17
|
||||
|
||||
* Support append object
|
||||
|
||||
## v2.0.6
|
||||
|
||||
* Trim access key id/secret and endpoint
|
||||
* Refine tests and setup travis CI
|
||||
|
||||
## v2.0.5
|
||||
|
||||
* Added Add/Delete/Get BucketCname interface
|
||||
|
||||
## v2.0.4
|
||||
|
||||
* Added Put/Get Object Acl interface
|
||||
|
||||
## v2.0.3
|
||||
|
||||
* Fixing the constants in Util is defined in a PHP version that is less than 5.6.
|
||||
|
||||
## v2.0.2
|
||||
|
||||
* The problem of content-type cannot be specified when restoring multipart uploads
|
||||
|
||||
## v2.0.1
|
||||
|
||||
* Increase the ListObjects/ListMultipartUploads special characters
|
||||
* Provides the interface to get the details of the OssException
|
||||
|
||||
|
||||
## 2015.11.25
|
||||
|
||||
* **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.**
|
||||
|
||||
## Modify the content
|
||||
|
||||
* 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
|
||||
# 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.
|
||||
* Added: support more bucket stat info.
|
||||
|
||||
## v2.5.0 / 2022-05-13
|
||||
* Added: support bucket transfer acceleration.
|
||||
* Added: support bucket cname token.
|
||||
* Added: support listobjectsV2.
|
||||
|
||||
## v2.4.3 / 2021-08-25
|
||||
* Fixed: integer overflow in PHP5.x.
|
||||
|
||||
## v2.4.2 / 2021-06-04
|
||||
* Compatible with PHP8.
|
||||
* Fixed: compatible with PHP5.4.
|
||||
* Fixed: the signature is incorrect in some scenarios
|
||||
* Update: change $requestUrl from a member variable to a local variable.
|
||||
|
||||
## v2.4.1 / 2020-09-29
|
||||
* Fixed: the getBucketPolicy bug.
|
||||
|
||||
|
||||
## v2.4.0 / 2020-08-31
|
||||
|
||||
* Added: disable Expect: 100-continue
|
||||
* Added: support getBucketInfo
|
||||
* Added: support getBucketStat
|
||||
* Added: support bucket policy
|
||||
* Added: support bucket encryption
|
||||
* Added: support bucket tagging
|
||||
* Added: support bucket worm
|
||||
* Added: support versioning
|
||||
* Added: support request payment
|
||||
* Added: support object tagging
|
||||
* Added: support code archive
|
||||
* Added: support process object
|
||||
* Added: support traffic limit paramter
|
||||
* Added: support upload object from file handle
|
||||
* Added: support getSimplifiedObjectMeta
|
||||
* Fixed: the object name can not be '0' stirng.
|
||||
* Update: endpoint validity check
|
||||
* Update: add new pre-signed url api
|
||||
|
||||
|
||||
## v2.3.1 / 2019-01-15
|
||||
|
||||
* translate chinese comments into english
|
||||
* Added: endpoint validity check
|
||||
|
||||
## v2.3.0 / 2018-01-05
|
||||
|
||||
* Fixed: putObject support creating empty files
|
||||
* Fixed: createBucket support IA/Archive
|
||||
* Added: support restoreObject
|
||||
* Added: support the Symlink feature
|
||||
* Added: support getBucketLocation
|
||||
* Added: support getBucketMeta
|
||||
* Added: support proxy server Proxy
|
||||
|
||||
## v2.2.4 / 2017-04-25
|
||||
|
||||
* Fixed getObject to local file bug
|
||||
|
||||
## v2.2.3 / 2017-04-14
|
||||
|
||||
* Fixed md5 check
|
||||
|
||||
## v2.2.2 / 2017-01-18
|
||||
|
||||
* Resolve to run the connection number and memory bug on php7
|
||||
|
||||
## v2.2.1 / 2016-12-01
|
||||
|
||||
* No HTTP curl is allowed to automatically populate accept-encoding
|
||||
|
||||
## v2.2.0 / 2016-11-22
|
||||
|
||||
* Fixed PutObject/CompleteMultipartUpload return values(#26)
|
||||
|
||||
## v2.1.0 / 2016-11-12
|
||||
|
||||
* Added[RTMP](https://help.aliyun.com/document_detail/44297.html)interface
|
||||
* Add support[image service](https://help.aliyun.com/document_detail/44686.html)
|
||||
|
||||
## v2.0.7 / 2016-06-17
|
||||
|
||||
* Support append object
|
||||
|
||||
## v2.0.6
|
||||
|
||||
* Trim access key id/secret and endpoint
|
||||
* Refine tests and setup travis CI
|
||||
|
||||
## v2.0.5
|
||||
|
||||
* Added Add/Delete/Get BucketCname interface
|
||||
|
||||
## v2.0.4
|
||||
|
||||
* Added Put/Get Object Acl interface
|
||||
|
||||
## v2.0.3
|
||||
|
||||
* Fixing the constants in Util is defined in a PHP version that is less than 5.6.
|
||||
|
||||
## v2.0.2
|
||||
|
||||
* The problem of content-type cannot be specified when restoring multipart uploads
|
||||
|
||||
## v2.0.1
|
||||
|
||||
* Increase the ListObjects/ListMultipartUploads special characters
|
||||
* Provides the interface to get the details of the OssException
|
||||
|
||||
|
||||
## 2015.11.25
|
||||
|
||||
* **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.**
|
||||
|
||||
## Modify the content
|
||||
|
||||
* 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
|
||||
|
||||
[](https://packagist.org/packages/aliyuncs/oss-sdk-php)
|
||||
[](https://travis-ci.org/aliyun/aliyun-oss-php-sdk)
|
||||
[](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)
|
||||
|
||||
## 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.
|
||||
|
||||
|
||||
## Run environment
|
||||
- PHP 5.3+.
|
||||
- cURL extension.
|
||||
|
||||
Tips:
|
||||
|
||||
- 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
|
||||
|
||||
- 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
|
||||
|
||||
You can also declare the dependency on Alibaba Cloud OSS SDK for PHP in the `composer.json` file.
|
||||
|
||||
"require": {
|
||||
"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:
|
||||
|
||||
require_once __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
- You can also directly download the packaged [PHAR File][releases-page], and
|
||||
introduce the file to your code:
|
||||
|
||||
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:
|
||||
|
||||
require_once '/path/to/oss-sdk/autoload.php';
|
||||
|
||||
## Quick use
|
||||
|
||||
### Common classes
|
||||
|
||||
| Class | Explanation |
|
||||
|:------------------|:------------------------------------|
|
||||
|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. |
|
||||
|
||||
### Initialize an OssClient
|
||||
|
||||
The SDK's operations for the OSS are performed through the OssClient class. The code below creates an OssClient object:
|
||||
|
||||
```php
|
||||
<?php
|
||||
$accessKeyId = "<AccessKeyID 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>";
|
||||
try {
|
||||
$ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint);
|
||||
} catch (OssException $e) {
|
||||
print $e->getMessage();
|
||||
}
|
||||
```
|
||||
|
||||
### 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:
|
||||
|
||||
```php
|
||||
<?php
|
||||
$bucket= "<Name of the bucket 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
|
||||
try {
|
||||
$ossClient->putObject($bucket, $object, $content);
|
||||
} catch (OssException $e) {
|
||||
print $e->getMessage();
|
||||
}
|
||||
```
|
||||
|
||||
### 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:
|
||||
|
||||
```php
|
||||
<?php
|
||||
$bucket= "<Name of the bucket in use. Pay attention to naming conventions>";
|
||||
try {
|
||||
$ossClient->createBucket($bucket);
|
||||
} catch (OssException $e) {
|
||||
print $e->getMessage();
|
||||
}
|
||||
```
|
||||
|
||||
### Handle returned results
|
||||
|
||||
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*.
|
||||
- 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
|
||||
$bucketListInfo = $ossClient->listBuckets();
|
||||
$bucketList = $bucketListInfo->getBucketList();
|
||||
foreach($bucketList as $bucket) {
|
||||
print($bucket->getLocation() . "\t" . $bucket->getName() . "\t" . $bucket->getCreateDate() . "\n");
|
||||
}
|
||||
```
|
||||
In the above code, $bucketListInfo falls into the 'OSS\Model\BucketListInfo' data type.
|
||||
|
||||
|
||||
### Run a sample project
|
||||
|
||||
- Modify `samples/Config.php` to complete the configuration information.
|
||||
- Run `cd samples/ && php RunAll.php`.
|
||||
|
||||
### Run a unit test
|
||||
|
||||
- Run `composer install` to download the dependent libraries.
|
||||
- Set the environment variable.
|
||||
|
||||
export OSS_ACCESS_KEY_ID=access-key-id
|
||||
export OSS_ACCESS_KEY_SECRET=access-key-secret
|
||||
export OSS_ENDPOINT=endpoint
|
||||
export OSS_BUCKET=bucket-name
|
||||
|
||||
- Run `php vendor/bin/phpunit`
|
||||
|
||||
## License
|
||||
|
||||
- MIT
|
||||
|
||||
## Contact us
|
||||
|
||||
- [Alibaba Cloud OSS official website](http://oss.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 official technical support: [Submit a ticket](https://workorder.console.aliyun.com/#/ticket/createIndex).
|
||||
|
||||
[releases-page]: https://github.com/aliyun/aliyun-oss-php-sdk/releases
|
||||
[phar-composer]: https://github.com/clue/phar-composer
|
||||
|
||||
# Alibaba Cloud OSS SDK for PHP
|
||||
|
||||
[](https://packagist.org/packages/aliyuncs/oss-sdk-php)
|
||||
[](https://travis-ci.org/aliyun/aliyun-oss-php-sdk)
|
||||
[](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)
|
||||
|
||||
## 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.
|
||||
|
||||
|
||||
## Run environment
|
||||
- PHP 5.3+.
|
||||
- cURL extension.
|
||||
|
||||
Tips:
|
||||
|
||||
- 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
|
||||
|
||||
- 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
|
||||
|
||||
You can also declare the dependency on Alibaba Cloud OSS SDK for PHP in the `composer.json` file.
|
||||
|
||||
"require": {
|
||||
"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:
|
||||
|
||||
require_once __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
- You can also directly download the packaged [PHAR File][releases-page], and
|
||||
introduce the file to your code:
|
||||
|
||||
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:
|
||||
|
||||
require_once '/path/to/oss-sdk/autoload.php';
|
||||
|
||||
## Quick use
|
||||
|
||||
### Common classes
|
||||
|
||||
| Class | Explanation |
|
||||
|:------------------|:------------------------------------|
|
||||
|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. |
|
||||
|
||||
### Initialize an OssClient
|
||||
|
||||
The SDK's operations for the OSS are performed through the OssClient class. The code below creates an OssClient object:
|
||||
|
||||
```php
|
||||
<?php
|
||||
$accessKeyId = "<AccessKeyID 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>";
|
||||
try {
|
||||
$ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint);
|
||||
} catch (OssException $e) {
|
||||
print $e->getMessage();
|
||||
}
|
||||
```
|
||||
|
||||
### 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:
|
||||
|
||||
```php
|
||||
<?php
|
||||
$bucket= "<Name of the bucket 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
|
||||
try {
|
||||
$ossClient->putObject($bucket, $object, $content);
|
||||
} catch (OssException $e) {
|
||||
print $e->getMessage();
|
||||
}
|
||||
```
|
||||
|
||||
### 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:
|
||||
|
||||
```php
|
||||
<?php
|
||||
$bucket= "<Name of the bucket in use. Pay attention to naming conventions>";
|
||||
try {
|
||||
$ossClient->createBucket($bucket);
|
||||
} catch (OssException $e) {
|
||||
print $e->getMessage();
|
||||
}
|
||||
```
|
||||
|
||||
### Handle returned results
|
||||
|
||||
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*.
|
||||
- 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
|
||||
$bucketListInfo = $ossClient->listBuckets();
|
||||
$bucketList = $bucketListInfo->getBucketList();
|
||||
foreach($bucketList as $bucket) {
|
||||
print($bucket->getLocation() . "\t" . $bucket->getName() . "\t" . $bucket->getCreateDate() . "\n");
|
||||
}
|
||||
```
|
||||
In the above code, $bucketListInfo falls into the 'OSS\Model\BucketListInfo' data type.
|
||||
|
||||
|
||||
### Run a sample project
|
||||
|
||||
- Modify `samples/Config.php` to complete the configuration information.
|
||||
- Run `cd samples/ && php RunAll.php`.
|
||||
|
||||
### Run a unit test
|
||||
|
||||
- Run `composer install` to download the dependent libraries.
|
||||
- Set the environment variable.
|
||||
|
||||
export OSS_ACCESS_KEY_ID=access-key-id
|
||||
export OSS_ACCESS_KEY_SECRET=access-key-secret
|
||||
export OSS_ENDPOINT=endpoint
|
||||
export OSS_BUCKET=bucket-name
|
||||
|
||||
- Run `php vendor/bin/phpunit`
|
||||
|
||||
## License
|
||||
|
||||
- MIT
|
||||
|
||||
## Contact us
|
||||
|
||||
- [Alibaba Cloud OSS official website](http://oss.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 official technical support: [Submit a ticket](https://workorder.console.aliyun.com/#/ticket/createIndex).
|
||||
|
||||
[releases-page]: https://github.com/aliyun/aliyun-oss-php-sdk/releases
|
||||
[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" : {
|
||||
"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
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';
|
||||
$config = new RestoreConfig($day,$tier);
|
||||
$options = array(
|
||||
OssClient::OSS_RESTORE_CONFIG => $config
|
||||
OssClient::OSS_RESTORE_CONFIG => $config
|
||||
);
|
||||
$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.
|
||||
$options = array(
|
||||
OssClient::OSS_HEADERS => array(
|
||||
OssClient::OSS_TRAFFIC_LIMIT => 819200,
|
||||
));
|
||||
OssClient::OSS_HEADERS => array(
|
||||
OssClient::OSS_TRAFFIC_LIMIT => 819200,
|
||||
));
|
||||
// Speed limit upload.
|
||||
$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.
|
||||
* Loop through all the items returned from ListObjects.
|
||||
*
|
||||
@ -227,30 +227,47 @@ function listObjects($ossClient, $bucket)
|
||||
);
|
||||
try {
|
||||
$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) {
|
||||
printf(__FUNCTION__ . ": FAILED\n");
|
||||
printf($e->getMessage() . "\n");
|
||||
return;
|
||||
}
|
||||
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)
|
||||
{
|
||||
$prefix = 'oss-php-sdk-test/';
|
||||
$delimiter = '/';
|
||||
$maxkeys = 1000;
|
||||
$options = array(
|
||||
'delimiter' => $delimiter,
|
||||
'prefix' => $prefix,
|
||||
'max-keys' => $maxkeys,
|
||||
'start-after' =>'test-object',
|
||||
'fetch-owner' =>'true',
|
||||
);
|
||||
try {
|
||||
$listObjectInfo = $ossClient->listObjectsV2($bucket, $options);
|
||||
} catch (OssException $e) {
|
||||
printf(__FUNCTION__ . ": FAILED\n");
|
||||
printf($e->getMessage() . "\n");
|
||||
return;
|
||||
}
|
||||
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");
|
||||
}
|
||||
}
|
||||
$prefix = 'oss-php-sdk-test/';
|
||||
$delimiter = '/';
|
||||
$maxkeys = 1000;
|
||||
$options = array(
|
||||
'delimiter' => $delimiter,
|
||||
'prefix' => $prefix,
|
||||
'max-keys' => $maxkeys,
|
||||
'start-after' =>'test-object',
|
||||
'fetch-owner' =>'true',
|
||||
);
|
||||
try {
|
||||
$listObjectInfo = $ossClient->listObjectsV2($bucket, $options);
|
||||
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) {
|
||||
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) {
|
||||
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)
|
||||
{
|
||||
$object = "upload-test-object-name.txt";
|
||||
$content = file_get_contents(__FILE__);
|
||||
$options = array(
|
||||
OssClient::OSS_HEADERS => array(
|
||||
OssClient::OSS_TRAFFIC_LIMIT => 819200,
|
||||
));
|
||||
try {
|
||||
$ossClient->putObject($bucket, $object, $content, $options);
|
||||
} catch (OssException $e) {
|
||||
printf(__FUNCTION__ . ": FAILED\n");
|
||||
printf($e->getMessage() . "\n");
|
||||
return;
|
||||
}
|
||||
print(__FUNCTION__ . ": OK" . "\n");
|
||||
$object = "upload-test-object-name.txt";
|
||||
$content = file_get_contents(__FILE__);
|
||||
$options = array(
|
||||
OssClient::OSS_HEADERS => array(
|
||||
OssClient::OSS_TRAFFIC_LIMIT => 819200,
|
||||
));
|
||||
try {
|
||||
$ossClient->putObject($bucket, $object, $content, $options);
|
||||
} catch (OssException $e) {
|
||||
printf(__FUNCTION__ . ": FAILED\n");
|
||||
printf($e->getMessage() . "\n");
|
||||
return;
|
||||
}
|
||||
print(__FUNCTION__ . ": OK" . "\n");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -648,19 +684,19 @@ function putObjectSpeed($ossClient, $bucket)
|
||||
*/
|
||||
function getObjectSpeed($ossClient, $bucket)
|
||||
{
|
||||
$object = "upload-test-object-name.txt";
|
||||
$options = array(
|
||||
OssClient::OSS_HEADERS => array(
|
||||
OssClient::OSS_TRAFFIC_LIMIT => 819200,
|
||||
));
|
||||
try {
|
||||
$ossClient->getObject($bucket, $object, $options);
|
||||
} catch (OssException $e) {
|
||||
printf(__FUNCTION__ . ": FAILED\n");
|
||||
printf($e->getMessage() . "\n");
|
||||
return;
|
||||
}
|
||||
print(__FUNCTION__ . ": OK" . "\n");
|
||||
$object = "upload-test-object-name.txt";
|
||||
$options = array(
|
||||
OssClient::OSS_HEADERS => array(
|
||||
OssClient::OSS_TRAFFIC_LIMIT => 819200,
|
||||
));
|
||||
try {
|
||||
$ossClient->getObject($bucket, $object, $options);
|
||||
} catch (OssException $e) {
|
||||
printf(__FUNCTION__ . ": FAILED\n");
|
||||
printf($e->getMessage() . "\n");
|
||||
return;
|
||||
}
|
||||
print(__FUNCTION__ . ": OK" . "\n");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -672,14 +708,14 @@ function getObjectSpeed($ossClient, $bucket)
|
||||
*/
|
||||
function signUrlSpeedUpload($ossClient, $bucket)
|
||||
{
|
||||
$object = "upload-test-object-name.txt";
|
||||
$timeout = 120;
|
||||
$options = array(
|
||||
OssClient::OSS_TRAFFIC_LIMIT => 819200,
|
||||
);
|
||||
$timeout = 60;
|
||||
$signedUrl = $ossClient->signUrl($bucket, $object, $timeout, "PUT", $options);
|
||||
print($signedUrl);
|
||||
$object = "upload-test-object-name.txt";
|
||||
$timeout = 120;
|
||||
$options = array(
|
||||
OssClient::OSS_TRAFFIC_LIMIT => 819200,
|
||||
);
|
||||
$timeout = 60;
|
||||
$signedUrl = $ossClient->signUrl($bucket, $object, $timeout, "PUT", $options);
|
||||
print($signedUrl);
|
||||
}
|
||||
|
||||
|
||||
@ -692,14 +728,14 @@ function signUrlSpeedUpload($ossClient, $bucket)
|
||||
*/
|
||||
function signUrlSpeedDownload($ossClient, $bucket)
|
||||
{
|
||||
$object = "upload-test-object-name.txt";
|
||||
$timeout = 120;
|
||||
$options = array(
|
||||
OssClient::OSS_TRAFFIC_LIMIT => 819200,
|
||||
);
|
||||
$signedUrl = $ossClient->signUrl($bucket, $object, $timeout, "GET", $options);
|
||||
print($signedUrl);
|
||||
print(__FUNCTION__ . ": OK" . "\n");
|
||||
$object = "upload-test-object-name.txt";
|
||||
$timeout = 120;
|
||||
$options = array(
|
||||
OssClient::OSS_TRAFFIC_LIMIT => 819200,
|
||||
);
|
||||
$signedUrl = $ossClient->signUrl($bucket, $object, $timeout, "GET", $options);
|
||||
print($signedUrl);
|
||||
print(__FUNCTION__ . ": OK" . "\n");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -711,19 +747,19 @@ function signUrlSpeedDownload($ossClient, $bucket)
|
||||
*/
|
||||
function restoreObject($ossClient, $bucket)
|
||||
{
|
||||
$object = "oss-php-sdk-test/upload-test-object-name.txt";
|
||||
$day = 3;
|
||||
$tier = 'Expedited';
|
||||
$config = new RestoreConfig($day,$tier);
|
||||
$options = array(
|
||||
OssClient::OSS_RESTORE_CONFIG => $config
|
||||
);
|
||||
try {
|
||||
$ossClient->restoreObject($bucket, $object,$options);
|
||||
} catch (OssException $e) {
|
||||
printf(__FUNCTION__ . ": FAILED\n");
|
||||
printf($e->getMessage() . "\n");
|
||||
return;
|
||||
}
|
||||
print(__FUNCTION__ . ": OK" . "\n");
|
||||
$object = "oss-php-sdk-test/upload-test-object-name.txt";
|
||||
$day = 3;
|
||||
$tier = 'Expedited';
|
||||
$config = new RestoreConfig($day,$tier);
|
||||
$options = array(
|
||||
OssClient::OSS_RESTORE_CONFIG => $config
|
||||
);
|
||||
try {
|
||||
$ossClient->restoreObject($bucket, $object,$options);
|
||||
} 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
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;
|
||||
|
||||
/**
|
||||
* 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
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
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Result/AclResult.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Result/AclResult.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Result/AppendResult.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Result/AppendResult.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Result/BodyResult.php
vendored
Executable file → Normal file
0
vendor/aliyuncs/oss-sdk-php/src/OSS/Result/BodyResult.php
vendored
Executable file → Normal file
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user