2017 © Pedro Peláez
 

yii2-extension yii2-aws

Yii2 Amazon Web Services (AWS)

image

cinghie/yii2-aws

Yii2 Amazon Web Services (AWS)

  • Wednesday, July 11, 2018
  • by cinghie
  • Repository
  • 1 Watchers
  • 0 Stars
  • 21 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Yii2 AWS

License Latest Stable Version Latest Release Date Latest Commit Total Downloads, (*1)

Yii2 AWS (Amazon Web Services) implementing Amazon AWS SDK for PHP, (*2)

Features

  • Amazon S3:
    https://docs.aws.amazon.com/en_us/sdk-for-php/v3/developer-guide/s3-examples.html
  • Amazon SES:
    https://docs.aws.amazon.com/en_us/sdk-for-php/v3/developer-guide/ses-examples.html
  • Amazon SNS:
    https://docs.aws.amazon.com/en_us/sdk-for-php/v3/developer-guide/sns-examples.html
  • Amazon SES Deliverability Dashboard:
    https://docs.aws.amazon.com/en_us/ses/latest/DeveloperGuide/bouncecomplaintdashboard.html

Installation

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": "*"

Configuration

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'],
    ],

],

Overrides

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',
            ],
        ],
    ],

],

Filters

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,
    ]

],

The Versions

11/07 2018

dev-master

9999999-dev https://github.com/cinghie/yii2-aws

Yii2 Amazon Web Services (AWS)

  Sources   Download

BSD-3-Clause

The Requires