2017 © Pedro Peláez
 

yii2-extension yii2-flysystem

Yii2 flysystem component

image

consik/yii2-flysystem

Yii2 flysystem component

  • Thursday, March 2, 2017
  • by consik
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Yii2 Flysystem component

Latest Stable Version Total Downloads License, (*1)

Yii2 component for working with league/flysystem., (*2)

Installation

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

Either run, (*4)

composer require consik/yii2-flysystem

or add, (*5)

"consik/yii2-flysystem": "^1.0"

Using

Define component in yii config for your filesystem:, (*6)

//config/web.php for simple application
'components' => [
    ... 
    'localFiles' => [
        'class' => consik\yii2flysystem\Filesystem::class,
        'adapter' => \League\Flysystem\Adapter\Local::class,
        'adapterParams' => [
            __DIR__ //first argument for Local adapter constructor is root dir
        ],
        'plugins' => [
            \League\Flysystem\Plugin\ListFiles::class
        ]
        //'config' => [] //\League\Flysystem\Filesystem config param
    ]
    ...
]

Use Filesystem methods via this component:, (*7)

\Yii::$app->localFiles->listFiles();
...etc

See DocBlock for more info about configuration params., (*8)

FTP source example:

'components' => [
    ... 
    'ftp' => [
        'class' => consik\yii2flysystem\Filesystem::class,
        'adapter' => \League\Flysystem\Adapter\Ftp::class,
        'adapterParams' => [
            [ //for FTP constructor first param is configuration array
                'host' => 'your.ftp.host',
                'username' => 'username',
                'password' => 'password'
            ]
        ],
        'plugins' => [
            \League\Flysystem\Plugin\ListFiles::class
        ]
    ]
    ...
]

List of available adapters or plugins see on official flysystem page: https://github.com/thephpleague/flysystem, (*9)

That's all! Enjoy!, (*10)

The Versions

02/03 2017

dev-master

9999999-dev

Yii2 flysystem component

  Sources   Download

MIT

The Requires

 

by Sergey Poltaranin (Consik)

filesystem component yii2 azure ftp flysystem dropbox google drive local samba

01/03 2017

1.0

1.0.0.0

Yii2 flysystem component

  Sources   Download

MIT

The Requires

 

by Sergey Poltaranin (Consik)

filesystem component yii2 azure ftp flysystem dropbox google drive local samba