dev-master
9999999-dev https://github.com/cinghie/yii2-awsYii2 Amazon Web Services (AWS)
BSD-3-Clause
The Requires
Yii2 Amazon Web Services (AWS)
Yii2 AWS (Amazon Web Services) implementing Amazon AWS SDK for PHP, (*2)
The preferred way to install this extension is through composer., (*3)
Either run, (*4)
$ php composer.phar require cinghie/yii2-aws "*"
or add, (*5)
"cinghie/yii2-aws": "*"
Add in your common configuration file:, (*6)
use cinghie\aws\components\AWS; use cinghie\aws\AWS as AWSModule; 'components' => [ 'aws' => [ 'class' => AWS::class, 'accessKey' => 'AMAZON_ACCESS_KEY', 'secretKey' => 'AMAZON_SECRET_KEY', 'region' => 'eu-west-1', 'version' => 'latest' ], ], 'modules' => [ 'aws' => [ 'class' => AWSModule::class, 'awsRoles' => ['admin'], ], ],
Override controller example, on modules config, (*7)
'modules' => [ 'aws' => [ 'class' => AWS::class, 'controllerMap' => [ 's3' => 'app\controllers\S3Controller', 'ses' => 'app\controllers\SesController', ] ] ],
Override models example, on modules config, (*8)
'modules' => [ 'aws' => [ 'class' => AWS::class, 'modelMap' => [ 'S3' => 'app\models\S3', 'SES' => 'app\models\SES', ] ] ],
Override view example, on components config, (*9)
'components' => [ 'view' => [ 'theme' => [ 'pathMap' => [ '@cinghie/aws/views/s3' => '@app/views/aws/s3', '@cinghie/aws/views/ses' => '@app/views/aws/ses', ], ], ], ],
If you have a Yii2 App Advanced (frontend/backend) you can exclude frontend actions, (*10)
use cinghie\articles\filters\FrontendFilter as AwsFrontendFilter; 'modules' => [ 'aws' => [ 'class' => AWS::class, 'as frontend' => AwsFrontendFilter::class, ] ],
Yii2 Amazon Web Services (AWS)
BSD-3-Clause