Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add method to get Rackspace Cloudfiles object #116

Closed
wants to merge 1 commit into from

Conversation

gigo6000
Copy link

The Rackspace Cloudfiles object is needed to get the CDN URL: $object->public_uri(), and currently there's no way to to this.

@l3l0
Copy link
Collaborator

l3l0 commented Dec 20, 2012

Hello @gigo6000

Thanks for PR but I have some issues with this.

You cannot use tryGetObject in Filesystem cause there is not such method in Adapter interface (Filesystem working on interface but it does not have information about concrete implementation and even then... not all adapters has some object).
You inject RackspaceContaine (CF_Container) object into adapter constructor so I think you can use this object to get public_uri in some other specific class created for that in your code (so just inject it to the other service)

Gaufrette is lib for file handling (read, write, delete etc) which allow change adapter without change our file handling code. File will be saved in some other place (amazon, ftp, other local path) then and it is really cool... and it working cause we using interface not concrete implementation that why I think I cannot merge your PR. sorry...

@l3l0 l3l0 closed this Dec 20, 2012
@gigo6000
Copy link
Author

Thanks I didn't notice I could get the object from the rackspace container.

@gigo6000
Copy link
Author

Do you know if there's a way to get the Cloudfiles container as a service? I can get the CF_Container object from the CF_Connection object using get_container(), but when I try the code below it returns a CF_Connection intance. And creating the CF_Container service doesn't work because the parameters are passed by reference wich triggers a PHP warning.

  <service id="acme_demo.cloudfiles_container" class="CF_Connection">
      <argument type="service" id="acme_demo.cloudfiles_authentication"></argument>

      <call method="get_container">
         <argument key="container">%acme_demo.container%</argument>
      </call>
  </service>

@l3l0
Copy link
Collaborator

l3l0 commented Dec 20, 2012

I haven't try it yet. I created issue for that in GaufretteBundle and try to handle this soon as possible. If you find a good way to handle that please share in KnpLabs/KnpGaufretteBundle#27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants