bryglen/yii2-aws

wrapper for yii aws

Installs: 9 863

Dependents: 0

Suggesters: 0

Security: 0

Stars: 5

Watchers: 2

Forks: 7

Open Issues: 2

Type:yii2-extension

dev-master 2014-05-29 14:59 UTC

This package is not auto-updated.

Last update: 2024-11-05 07:56:50 UTC


README

wrapper for yii aws

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist bryglen/yii2-aws "*"

or add

"bryglen/yii2-aws": "*"

to the require section of your composer.json file.

in your main.php, your configuration would look like this

'components' => [
	'aws' => [
		'class' => 'bryglen\aws\BaseAws',
		'key' => 'your_key',
		'secret' => 'your_secret',
		'region' => 'your_region',
		// optional config file
		//'configFile' => require_once('/path/to/aws.config.php'),
	]
]

Usage

Once the extension is installed, simply use it in your code by :

/* @var $aws \bryglen\aws\BaseAws */
$aws = Yii::$app->aws;
$s3 = $aws->get('s3');
$s3->putObject(.....)

$ses = $aws->get('ses');