Client for the Swift object store protocol

Installs: 1 158

Dependents: 0

Watchers: 6

Forks: 1

Open Issues: 1

Language: PHP

v1.0.1 2015-05-18 14:02 UTC


Build Status Code Coverage Scrutinizer Code Quality


composer require treehouselabs/swift-client:~1.0


use TreeHouse\Keystone\Client\ClientFactory;
use TreeHouse\Keystone\Client\Model\Tenant;

// use `treehouselabs/keystone-client` to initialize a Guzzle Client that can
// communicate with Keystone-authenticated services
$driver = new SwiftDriver($client);
$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

// update the object in the store

// ...

// get the stored container/object
$container = $store->getContainer('foo');
$object = $container->getObject('bar);

// get the contents