treehouselabs/swift-client

Client for the Swift object store protocol

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

This package is auto-updated.

Last update: 2024-04-12 22:21:41 UTC


README

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

Installation

composer require treehouselabs/swift-client:~1.0

Usage

// 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);

Testing

composer test

Security

If you discover any security related issues, please email peter@treehouse.nl instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.

Credits