simcu/speedycloud-storage
最新稳定版本:1.0
Composer 安装命令:
composer require simcu/speedycloud-storage
包简介
Speedycloud Object Storage sdks for php
README 文档
README
#Speedycloud-storage sdk
####support composer: composer require "simcu/speedycloud-storage" "1.0"
####1. how to use
use Speedycloud\Storage\Actor;
####2. init action
$scs = new Actor;
$scs->init('access_key','secret_key','bucket');
####3. Get all files in bucket (return array)
$scs->getObjects()
####4. create new object (return boolean)
$scs->newObject($remote, $content)
####5. set object acl (return boolean)
$acl = 'public-read'
$scs->aclObject($name,$acl)
####6. delete the object (return boolean)
$scs->delObject($name)
####7. get the object (return string of the content)
$scs->getObject($name)
####8. used with laravel
use Speedycloud\Storage\FlysystemAdapter;
Storage::extend('speedycloud',function($app,$config){
$client = new FlysystemAdapter($config['accessKey'],$config['secretKey'],$config['bucket']);
return new Filesystem($client);
});
统计信息
- 总下载量: 14
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD
- 更新时间: 2015-11-02