treehouselabs / swift-client
Client for the Swift object store protocol
Installs: 5 291
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 6
Forks: 0
Open Issues: 0
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
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.