obtao/amazon-webservices-bundle
最新稳定版本:0.0.3
Composer 安装命令:
composer require obtao/amazon-webservices-bundle
包简介
A Symfony2 Bundle for interfacing with Amazon Web Services (AWS)
关键字:
README 文档
README
Overview
This is a Symfony2 Bundle for interfacing with Amazon Web Services (AWS).
This bundle uses the AWS SDK for PHP by loading the SDK, and enabling you to instantiate the SDK's various web service objects, passing them back to you for direct use in your Symfony2 application..
Installation
Add this line to your composer.json file:
"require": { ..., "obtao/amazon-webservices-bundle": "*@stable" }
Then run composer update.
Then, add AmazonWebServicesBundle to your application kernel:
<?php // app/AppKernel.php public function registerBundles() { return array( // ... new Obtao\AmazonWebServicesBundle\ObtaoAmazonWebServicesBundle(), // ... ); }
Configuration
You can add the following default configuration to the config.yml file :
# app/config/config.yml obtao_amazon_web_services: key: YOUR_KEY secret: YOUR_SECRET region: YOUR_REGION
Usage
Once installed, you simply need to request the appropriate service for the Amazon Web Service object you wish to use. The returned object will then allow you full access the the API for the requested service.
Please see the AWS SDK for PHP documentation for a list of each service's API calls.
In this example, we get an AmazonSQS object from the AWS SDK for PHP library by requesting the obtao.aws_sqs service. We then use that object to retrieve a message from an existing Amazon SQS queue.
<?php // in a controller public function someAction() { // get the Simple Queue Service $awsSQS = $this->container->get('obtao.aws_sqs'); // do something }
Available Services
The following services are available, each returning an object allowing access to the respective Amazon Web Service
| Symfony Service Name | AWS SDK for PHP Object | Description |
|---|---|---|
| obtao.aws_sqs | AmazonSQS | Amazon Simple Queue Service |
| obtao.aws_s3 | AmazonS3 | Amazon Simple Storage Service |
More documentation
统计信息
- 总下载量: 186
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD
- 更新时间: 2015-07-28