treehouselabs / swift-client
Swift对象存储协议客户端
v2.0.1
2015-10-20 08:40 UTC
Requires
- php: >=5.6
- guzzlehttp/guzzle: ~6.0
- psr/log: ~1.0
- symfony/http-foundation: ~2.1
- treehouselabs/keystone-client: ~3.1
Requires (Dev)
- phpunit/phpunit: ~5.0
README
安装
composer require treehouselabs/swift-client:~1.0
使用
// use `treehouselabs/keystone-client` to initialize a Guzzle Client that can // communicate with Keystone-authenticated services $driver = new SwiftDriver($keystoneClient); $store = new ObjectStore($driver); // create a new container and object $container = $store->createContainer('foo'); $object = $store->createObject($container, 'bar'); // set a local file to the object $object->setLocalFile($file); // update the object in the store $store->updateObject($object); // ... // get the stored container/object $container = $store->getContainer('foo'); $object = $container->getObject('bar); // get the contents $store->getObjectContent($object);
测试
composer test
安全性
如果您发现任何与安全性相关的问题,请通过peter@treehouse.nl发送电子邮件,而不是使用问题跟踪器。
许可证
MIT许可证(MIT)。有关更多信息,请参阅许可证文件。