2017 © Pedro Peláez
 

yii2-extension yii2-filesystem

Yii2 filesystem

image

tiamo/yii2-filesystem

Yii2 filesystem

  • Wednesday, March 11, 2015
  • by tiamo
  • Repository
  • 1 Watchers
  • 1 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Yii2 filesystem

Yii2 filesystem, (*1)

Installation

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

Either run, (*3)

php composer.phar require --prefer-dist tiamo/yii2-filesystem "*"

or add, (*4)

"tiamo/yii2-filesystem": "*"

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

Usage

Once the extension is installed, simply use it in your code by :, (*6)

    'fs' => [
        'class' => 'tiamo\yii2-filesystem\Filesystem',
        'formats' => [
            '/w([0-9]+)h([0-9]+)/is' => function($w, $h, $path, $file){
                if ($file->isImage) {
                    $class = '\yii\imagine\Image';
                    $class::$driver = [$class::DRIVER_GD2];
                    $thumbnail = $class::thumbnail($path, $w, $h);
                    return $thumbnail->get($file->extension);
                }
            },
        ],
        'storage' => [
            's1' => [
                'baseUrl' => 'http://s1.site.com',
                'adapter' => 'ftp',
                'host' => '127.0.0.1',
                'root' => 'files'
            ],
        ],
    ],

The Versions

11/03 2015

dev-master

9999999-dev

Yii2 filesystem

  Sources   Download

BSD-3-Clause

The Requires

 

by Vladislav Kornienko

file filesystem storage flysystem

10/03 2015

v1.0

1.0.0.0

Yii2 filesystem

  Sources   Download

MIT

The Requires

 

by Vladislav Kornienko

file filesystem storage flysystem