uecode / amazon-bundle
此包已被弃用,不再维护。未建议替代包。
Symfony2 的 AWS SDK v2 Bundle
2.0.1
2014-02-05 22:54 UTC
Requires
- aws/aws-sdk-php: >=2.5.0
Suggests
- monolog/monolog: Allows more advanced logging of the application flow
This package is not auto-updated.
Last update: 2019-08-05 01:00:30 UTC
README
此包是 AWS PHP SDK v2 的语义配置和服务提供者
通用安装
- 在
require
下添加到 composer.json
"uecode/amazon-bundle": ">=2.0.0, <3.0.0",
- 在
AppKernel
中注册
$bundles = array( // ... new Uecode\Bundle\AmazonBundle\UecodeAmazonBundle() );
- 将账户信息添加到您的 config.yml
uecode_amazon: accounts: main: key: somekey secret: somesecret
用法
在您的代码中,完成以上步骤后,您应该可以使用以下方式获取 Amazon 服务
// get container $service = $container->get('uecode_amazon.instance.main'); // OR $service = $container->get('aws.main');
获取服务后,您将能够从 AWS 服务定位器中检索任何服务。
有关帮助,请参考以下指南: AWS SDK for PHP。在遵循这些指南时,您不需要使用工厂类,只需运行 service->get('service_name')
即可。
例如
$cloudFront = $container->get('aws.main')->get('CloudFront');
版权
版权所有 (c) 2014 Underground Elephant
许可
根据 Apache 许可证 2.0 版本许可。
请参阅 LICENSE。