dexamped/ /kohana-aws
Kohana 对 aws-php-sdk 的包装。
dev-3.3/master
2015-05-22 06:03 UTC
Requires
- php: >=5.3.3
- aws/aws-sdk-php: 2.8.6
- composer/installers: ~1.0
- kohana/core: 3.3.*
This package is not auto-updated.
Last update: 2024-09-28 18:05:15 UTC
README
Amazon AWS PHP SDK 的 Kohana 包装模块。
安装
安装模块
git submodule add git@github.com:dexamped/kohana-aws.git modules/kohana-aws
git submodule update --init --recursive
加载依赖
我们必须通过运行 composer install 安装供应商的依赖项。
composer install --working-dir=modules/kohana-aws/vendor/aws-sdk-php/
配置
编辑 application/bootstrap.php 并添加模块
Kohana::modules(array(
...
'aws' => 'modules/kohana-aws',
...
));
将 modules/kohana-aws/config/aws.php 复制到 APPPATH/config/aws.php 并设置您的配置。
使用方法
<?php class Controller_Amazon extends Controller { public function action_index() { // List some S3 buckets $s3 = Amazon::instance()->get('s3'); // Execute an S3 method $result = $s3->listBuckets(); // Do something with it here } } ?>