sintonia/airtime_mvc/application/cloud_storage/ProxyStorageBackend.php
drigato ab4ebb2969 SAAS-525: Station Termination -> Delete cloud_file table records
Deleted cloud_file records.
Renamed the function that does this.
2014-12-16 14:13:57 -05:00

51 lines
1.2 KiB
PHP

<?php
require_once 'StorageBackend.php';
require_once 'Amazon_S3.php';
/**
*
* Controls access to the storage backend class where a file is stored.
*
*/
class ProxyStorageBackend extends StorageBackend
{
private $storageBackend;
/**
* Receives the file's storage backend and instantiates the approriate
* object.
*/
public function ProxyStorageBackend($storageBackend)
{
$CC_CONFIG = Config::getConfig();
$this->storageBackend = new $storageBackend($CC_CONFIG[$storageBackend]);
}
public function getAbsoluteFilePath($resourceId)
{
return $this->storageBackend->getAbsoluteFilePath($resourceId);
}
public function getSignedURL($resourceId)
{
return $this->storageBackend->getSignedURL($resourceId);
}
public function getFileSize($resourceId)
{
return $this->storageBackend->getFileSize($resourceId);
}
public function deletePhysicalFile($resourceId)
{
$this->storageBackend->deletePhysicalFile($resourceId);
}
public function deleteAllCloudFileObjects()
{
$this->storageBackend->deleteAllCloudFileObjects();
}
}