The largest Interview Solution Library on the web


« Previous | 1 | 2 | 3 | Next »

Saas - Zend Cloud’s Storage service


  • Example : Instantiating an Amazon S3 adapter
    $storage = Zend_Cloud_StorageService_Factory::getAdapter(array(
    Zend_Cloud_StorageService_Factory::STORAGE_ADAPTER_KEY =>'Zend_Cloud_St,
    orageService_Adapter_S3',
    Zend_Cloud_StorageService_Adapter_S3::AWS_ACCESS_KEY =>$amazonKey,
    Zend_Cloud_StorageService_Adapter_S3::AWS_SECRET_KEY =>$amazonSecret,
    ));
  • Storing an item with Zend Cloud:
    $data = file_get_contents('/my/local/dir/picture.jpg');
    $returnedData = $storage->storeItem('/my/remote/path/picture.jpg',
    $data);
    One just has to modify the adapter to work with different providers.
« Previous | 1 | 2 | 3 | Next »


copyright © 2014 - all rights riserved by javatechnologycenter.com