allow using 'bucket' to set the swift container

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2016-11-04 14:15:18 +01:00
parent a77e7075f6
commit b72e5a2e4e
No known key found for this signature in database
GPG Key ID: 425003AC385454C5
1 changed files with 4 additions and 0 deletions

View File

@ -30,6 +30,7 @@ use OpenCloud\OpenStack;
use OpenCloud\Rackspace;
class Swift implements IObjectStore {
/**
* @var \OpenCloud\OpenStack
*/
@ -51,6 +52,9 @@ class Swift implements IObjectStore {
private $container;
public function __construct($params) {
if (isset($params['bucket'])) {
$params['container'] = $params['bucket'];
}
if (!isset($params['container'])) {
$params['container'] = 'owncloud';
}