-
Notifications
You must be signed in to change notification settings - Fork 0
Home
chrux edited this page Mar 18, 2013
·
5 revisions
Rackspace Cloud Files bundle is a simple and easy way to use the namespaced version of php-opencloud with Symfony2 applications, but it has also some facilities for handle the static file with the rackspace cloud files.
Have fun!
deps:
[php-opencloud]
[email protected]:rackspace/php-opencloud.git
target=/rackspace/php-opencloud
[RackspaceCloudFilesBundle]
[email protected]:clov3rlabs/rackspacecloudfilesbundle.git
target=/bundles/Clov3rLabs/RackspaceCloudFilesBundle
app/autoload.php:
$loader->registerNamespaces(array(
// Clov3r Labs Rackspace Cloud Files Bundle
'Clov3rLabs\\RackspaceCloudFilesBundle' => __DIR__.'/../vendor/bundles',
));
// PHP SDK for OpenStack/Rackspace APIs
require_once __DIR__.'/../vendor/rackspace/php-opencloud/lib/rackspace.php';
require_once __DIR__.'/../vendor/rackspace/php-opencloud/lib/objectstore.php';
app/AppKernel.php
public function registerBundles()
{
return array(
// Clov3r Labs Rackspace Cloud Files Bundle
new Clov3rLabs\RackspaceCloudFilesBundle\Clov3rLabsRackspaceCloudFilesBundle(),
);
...
app/config/parameters.ini
[parameters]
...
rackspace_username = "YOUR-USERNAME"
rackspace_apikey = "YOUR-API-KEY"
;rackspace_container_name = "YOUR-CONTAINER-NAME"
;rackspace_container_region = "YOUR-CONTAINER-REGION"
;rackspace_endpoint = "US"
In rackspace_endpoint we can use US (default) or UK.
app/config/config.yml
# Clov3r Labs Rackspace Cloud Files Configuration
clov3r_labs_rackspace_cloud_files:
auth:
username: %rackspace_username%
apikey: %rackspace_apikey%
#containername:
#endpoint: %rackspace_endpoint% # Default US