KnpLabs/Gaufrette — pull request #173 by zeroasterisk (2013-04-26 19:39:58+00:00)
Title: RackspaceCloudFiles via OpenStack - Switched to 'ObjectStore\Service'

I had to switch from expecting 'ObjectStore' to expecting 'ObjectStore\Service'
to get Rackspace to load with the latest code from https://github.com/rackspace/php-opencloud

This is my first implementation of Gaufrette, and perhaps I've done something wrong along the way... but I DID get this to work... but I couldn't get the 'ObjectStore' by itself, following the docs at https://github.com/rackspace/php-opencloud -- it only gave me the 'ObjectStore\Service' object.

Once I switched Gaufrette's expectations, it worked like expected.

$connection = new OpenCloud\Rackspace(
'https://identity.api.rackspacecloud.com/v2.0/',
array(
'username' => 'xxxxxxx',
'apiKey' => 'xxxxxxxxxxxxx',
)
);
$objectStore = $connection->ObjectStore('cloudFiles', 'ORD', 'publicURL' );
$adapter = new Gaufrette\Adapter\OpenCloud(
$objectStore,
'my-container',
true,
true
);