2017 © Pedro Peláez
 

yii2-extension yii2-resource-manager-component

Resource manager eases your project resources management.

image

2amigos/yii2-resource-manager-component

Resource manager eases your project resources management.

  • Saturday, February 13, 2016
  • by tonydspaniard
  • Repository
  • 11 Watchers
  • 35 Stars
  • 10,886 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 16 Forks
  • 5 Open issues
  • 3 Versions
  • 8 % Grown

The README.md

Resource Manager component for Yii 2

Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

This extension allows you to manage resources. Currently supports two possible scenarios:, (*2)

  • Resources to save/or saved on a server's folder
  • Resources to save/or saved on an Amazon S3 bucket

Installation

The preferred way to install this extension is through composer., (*3)

Either run, (*4)

php composer.phar require 2amigos/yii2-resource-manager-component "*"

or add, (*5)

"2amigos/yii2-resource-manager-component": "*"

to the require section of your composer.json file., (*6)

Configuring

Configure the selected component on your configuration file as follows:, (*7)

// For this example we using AmazonS3ResourceManager component
// ...
'components' => [  
    // ...   
    'resourceManager' => [
    'class' => 'dosamigos\resourcemanager\AmazonS3ResourceManager',
        'key' => 'YOUR-AWS-KEY-HERE',
        'secret' => 'YOUR-AWS-SECRET-HERE',
        'bucket' => 'YOUR-AWS-BUCKET-NAME-HERE'
    ]
    // ...
]
// ...  

Done... Now, to save a resource to AWS S3 server, we just need to do the following:, (*8)

// Defensive code checks not written for the example
$resource = yii\web\UploadedFile::getInstanceByName('instance-name');
$name = md5($resource->name) . '.' . $resource->getExtension();
if(\Yii::$app->resourceManager->save($resource, $name)) {
    echo 'Done...';
}

Notes

Looking for a version for the Yii 1.1? There is dedicated repository for it: 2amigos/resource-manager., (*9)

2amigOS!
Web development has never been so fun!
www.2amigos.us, (*10)

The Versions

13/02 2016

dev-master

9999999-dev https://github.com/2amigos/yii2-resource-manager-component

Resource manager eases your project resources management.

  Sources   Download

BSD-3-Clause

The Requires

 

component extension yii resource

15/05 2015

dev-develop

dev-develop https://github.com/2amigos/yii2-resource-manager-component

The resource manager component for the Yii framework

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alexander Kochetov

yii2 2amigos yii resource yii 2

19/02 2014

0.1.0

0.1.0.0 https://github.com/2amigos/yii2-resource-manager-component

Resource manager eases your project resources management.

  Sources   Download

BSD-3-Clause

The Requires

 

component extension yii resource