danhunsaker/flysystem-redis
最新稳定版本:v1.0.4
Composer 安装命令:
composer require danhunsaker/flysystem-redis
包简介
A Flysystem adapter for storing files in Redis
README 文档
README
This is a Redis adapter for Flysystem.
Installation
Composer is the best way, as with all of Flysystem!
composer require danhunsaker/flysystem-redis
Usage
The usual. Create a client instance, pass it to the adapter, and pass that to the filesystem:
use Predis\Client; use League\Flysystem\Filesystem; use Danhunsaker\Flysystem\Redis\RedisAdapter; $redis = new Client(); $adapter = new RedisAdapter($redis); $filesystem = new Filesystem($adapter);
If Predis's assumed defaults of 127.0.0.1 and 6379 for host and port (respectively) aren't sufficient, you can pass your own values, just as you normally would when setting up Predis elsewhere in your projects:
use Predis\Client; use League\Flysystem\Filesystem; use Danhunsaker\Flysystem\Redis\RedisAdapter; $redis = new Client([ 'scheme' => 'tcp', 'host' => '10.0.0.1', 'port' => 6379, ]); $adapter = new RedisAdapter($redis); $filesystem = new Filesystem($adapter);
See the Predis docs for more on how to set it up...
And head to GitHub for everything else.
统计信息
- 总下载量: 141.2k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 18
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2015-10-25