Skip to content

Instantly share code, notes, and snippets.

@deeravenger
Created March 14, 2015 14:58
Show Gist options
  • Save deeravenger/49edd74e601634257439 to your computer and use it in GitHub Desktop.
Save deeravenger/49edd74e601634257439 to your computer and use it in GitHub Desktop.
Selectel flysystem
<?php
use OpenCloud\OpenStack;
use League\Flysystem\Filesystem;
use League\Flysystem\Rackspace\RackspaceAdapter;
$client = new OpenStack('https://auth.selcdn.ru', [
'username' => '...',
'password' => '...'
]);
$store = $client->objectStoreService('swift', 'Common');
$container = $store->getContainer('YOUR_CONTAINER_NAME');
$filesystem = new Filesystem(new RackspaceAdapter($container));
var_dump($filesystem->listContents());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment