86 lines
2.4 KiB
PHP
86 lines
2.4 KiB
PHP
<?php
|
|
|
|
namespace App\AlbumSources;
|
|
use App\Photo;
|
|
use Symfony\Component\HttpFoundation\File\File;
|
|
|
|
/**
|
|
* Driver for managing files on the local filesystem.
|
|
* @package App\AlbumSources
|
|
*/
|
|
class OpenStackSource extends AlbumSourceBase implements IAlbumSource
|
|
{
|
|
/**
|
|
* Deletes an entire album's media contents.
|
|
* @return void
|
|
*/
|
|
function deleteAlbumContents()
|
|
{
|
|
// TODO: Implement deleteAlbumContents() method.
|
|
}
|
|
|
|
/**
|
|
* Deletes a thumbnail file for a photo.
|
|
* @param Photo $photo Photo to delete the thumbnail from.
|
|
* @param string $thumbnail Thumbnail to delete (or null to delete the original.)
|
|
* @return void
|
|
*/
|
|
function deleteThumbnail(Photo $photo, $thumbnail = null)
|
|
{
|
|
// TODO: Implement deleteThumbnail() method.
|
|
}
|
|
|
|
/**
|
|
* Gets the name of this album source.
|
|
* @return string
|
|
*/
|
|
function getName()
|
|
{
|
|
return 'global.album_sources.openstack';
|
|
}
|
|
|
|
/**
|
|
* Gets the absolute path to the given photo file.
|
|
* @param Photo $photo Photo to get the path to.
|
|
* @param string $thumbnail Thumbnail to get the image to.
|
|
* @return string
|
|
*/
|
|
function getPathToPhoto(Photo $photo, $thumbnail = null)
|
|
{
|
|
// TODO: Implement getPathToPhoto() method.
|
|
}
|
|
|
|
/**
|
|
* Gets the absolute URL to the given photo file.
|
|
* @param Photo $photo Photo to get the URL to.
|
|
* @param string $thumbnail Thumbnail to get the image to.
|
|
* @return string
|
|
*/
|
|
function getUrlToPhoto(Photo $photo, $thumbnail = null)
|
|
{
|
|
// TODO: Implement getUrlToPhoto() method.
|
|
}
|
|
|
|
/**
|
|
* Saves a generated thumbnail to its permanent location.
|
|
* @param Photo $photo Photo the thumbnail relates to.
|
|
* @param string $thumbnailInfo Information about the thumbnail.
|
|
* @param string $tempFilename Filename containing the thumbnail.
|
|
* @return mixed
|
|
*/
|
|
function saveThumbnail(Photo $photo, $thumbnailInfo, $tempFilename)
|
|
{
|
|
// TODO: Implement saveThumbnail() method.
|
|
}
|
|
|
|
/**
|
|
* Saves an uploaded file to the container and returns the filename.
|
|
* @param File $uploadedFile The photo uploaded
|
|
* @param string $overrideFilename Specific file name to use, or null to randomly generate one.
|
|
* @return File
|
|
*/
|
|
function saveUploadedPhoto(File $uploadedFile, $overrideFilename = null)
|
|
{
|
|
// TODO: Implement saveUploadedPhoto() method.
|
|
}
|
|
} |