creocoder / yii2-flysystem

The Flysystem integration for the Yii framework.
Other
283 stars 76 forks source link

feature - get real FileSystem instance #18

Closed k-timoshenko closed 6 years ago

k-timoshenko commented 8 years ago

I think that it is better to depend upon originally file system interface instead of component creocoder\flysystem\Filesystem. Because this class is Yii2 specific component.

ivansal commented 8 years ago

Up. Need for some extensions, example http://glide.thephpleague.com/1.0/config/source-and-cache/

$server = ServerFactory::create(
    [
        'source' => Yii::$app->fs,
        'cache' => Yii::$app->fs,
        'source_path_prefix' => 'source',
        'cache_path_prefix' => 'cache',
    ]
);

receive exception

Argument 1 passed to League\Glide\Server::__construct() must implement interface League\Flysystem\FilesystemInterface, instance of creocoder\flysystem\LocalFilesystem given, called in /path/vendor/league/glide/src/ServerFactory.php on line 53
schmunk42 commented 6 years ago

Thank you! I will change that to getFilesystem