ebichan / silex-aws-provider
Silex 框架的 AWS 服务提供商。
dev-master
2015-04-27 20:43 UTC
Requires
- aws/aws-sdk-php: >=2.4.6
- pimple/pimple: *
- silex/silex: 1.*
This package is not auto-updated.
Last update: 2024-09-24 07:08:05 UTC
README
通过 composer 安装
在您的 composer.json
中添加此库的依赖项。
{ "require": { "ebichan/silex-aws-provider": "dev-master" } }
然后运行 composer install
(或 update
)以下载所有文件。
用法
服务注册
$app->register(new AmqpServiceProvider, array( 'aws.connections' => array( 'default' => array( 'key' => '', 'secret' => '', 'region' => 'us-east-1' ) ), ));
获取连接
$connections = $app['aws']; $defaultConnection = $connections['default'];
通过工厂创建 aws 连接
$awsFactory = $app['aws.factory']; $customConnection = $awsFactory('', '', 'us-east-1');