treehouselabs / swift-client

Swift对象存储协议客户端

v2.0.1 2015-10-20 08:40 UTC

This package is auto-updated.

Last update: 2024-09-12 23:07:47 UTC


README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score

安装

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)。有关更多信息,请参阅许可证文件

致谢