laasti/flysystem-provider
最新稳定版本:v2.0.1
Composer 安装命令:
composer require laasti/flysystem-provider
包简介
A league/container v2 service provider for Flysystem.
README 文档
README
Installation
composer require laasti/flysystem-provider
Usage
$container = new League\Container\Container; $container->addServiceProvider('Laasti\FlysystemProvider\FlysystemProvider'); //The first defined adapter is used as the default for League\Flysystem\FilesystemInterface $container->add('config.flysystem', [ //the first item in array is the adapter class, the second is the adapter's constructor parameters 'upload' => ['League\Flysystem\Adapter\Local', ['your-uploads-directory']], 'temp' => ['League\Flysystem\Adapter\Local', ['your-temp-directory']], //see League/Flysystem's documentation for more adapters ]); $manager = $container->get('League\Flysystem\MountManager'); $manager->read('upload://path-to-file.txt); //or get the default filesystem $filesystem = $container->get('League\Flysystem\FilesystemInterface'); //or get a filesystem by its name from the container $tempFiles = $container->get('flysystem.filesystem.temp'); //or an adapter $tempAdapter = $container->get('flysystem.adapter.temp');
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request :D
History
See Github's releases or tags
Credits
Author: Sonia Marquette (@nebulousGirl)
License
Released under the MIT License. See LICENSE.txt file.
统计信息
- 总下载量: 290
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-08-29