dev-master
9999999-devYii2 filesystem
BSD-3-Clause
The Requires
by Vladislav Kornienko
file filesystem storage flysystem
v1.0
1.0.0.0Yii2 filesystem
MIT
The Requires
by Vladislav Kornienko
file filesystem storage flysystem
Wallogit.com
2017 © Pedro Peláez
Yii2 filesystem
Yii2 filesystem, (*1)
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)
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'
],
],
],
Yii2 filesystem
BSD-3-Clause
file filesystem storage flysystem
Yii2 filesystem
MIT
file filesystem storage flysystem