mvbcoding/aws-sdk-php-v3-bridge-silex
Composer 安装命令:
composer require mvbcoding/aws-sdk-php-v3-bridge-silex
包简介
A simple Silex service provider for including the AWS SDK v3 bridge for PHP.
README 文档
README
A simple Silex service provider for including the AWS SDK for PHP - Version 3 Upgrade Bridge.
Installation
The AWS Service Provider can be installed via Composer by requiring the
mvbcoding/aws-sdk-php-v3-bridge-silex package in your project's composer.json.
{
"require": {
"mvbcoding/aws-sdk-php-v3-bridge-silex": "^3.0"
}
}
Usage
Register the AWS Service Provider in your Silex application and provide your AWS SDK for PHP configuration to the app
in the aws.config key. $app['aws.config'] should contain an array of configuration options or the path to a
configuration file. This value is passed directly into new Aws\SimpleDb\SimpleDbClient.
<?php
require __DIR__ . '/vendor/autoload.php';
use MvbCoding\Silex\AwsV3BridgeServiceProvider;
use Silex\Application;
$app = new Application();
$app->register(new AwsV3BridgeServiceProvider(), array(
'aws.config' => array(
'version' => 'latest',
'region' => 'eu-west-1',
)
));
$app->match('/', function () use ($app) {
// Create a list of your SimpleDb Domains
$domains = $app['aws.simpledb']->listDomains();
$output = "<ul>\n";
foreach ($domains['DomainNames'] as $domain) {
$output .= "<li>{$domain}</li>\n";
}
$output .= "</ul>\n";
return $output;
});
$app->run();
Links
统计信息
- 总下载量: 17
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-2-Clause
- 更新时间: 2016-05-21
