programster/aws-wrapper
最新稳定版本:4.1.0
Composer 安装命令:
composer require programster/aws-wrapper
包简介
A package to make it easier to interface with the AWS API.
关键字:
README 文档
README
This package aims to wrap around Amazons PHP sdk so that it provides the developer with a more object-orientated interface. Thus, the developer will spend less time having to read the documentation in order to look-up the parameters they need to pass into an array.
This version of the wrapper is based on version 3 of the SDK.
Installation
composer require programster/aws-Wrapper
Example Usage
<?php require_once(__DIR__ . '/vendor/autoload.php'); define('S3_BUCKET', 'my-bucket-name'); define('AWS_KEY', 'someKeyValueHere'); define('AWS_SECRET', 'someAwsSecretHere'); $awsWrapper = new \Programster\AwsWrapper\AwsWrapper( AWS_KEY, AWS_SECRET, Programster\AwsWrapper\Enums\AwsRegion::create_EU_W1() ); # Get the S3 client for interfacing with S3, rather than EC2 $s3Client = $awsWrapper->getS3Client(); # Create a private file in S3 called "test-file.txt" that contains the text # "hello world" in our bucket. $response = $s3Client->createFile( S3_BUCKET, "hello world", 'test-file.txt', Programster\AwsWrapper\S3\Acl::createAuthenticatedRead(), Programster\AwsWrapper\S3\StorageClass::createStandard() );
Debugging
I've occasionally had issues with running commands that would just block and never return. The solution for me was to install the php-xml package with
sudo apt-get install php-xml
I will remove this note once I have figured out how to make composer require that for installation.
统计信息
- 总下载量: 1.52k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-12-04