2016-09-02 22:00:42 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\AlbumSources;
|
|
|
|
|
|
|
|
use App\Album;
|
|
|
|
use App\Photo;
|
|
|
|
use Symfony\Component\HttpFoundation\File\File;
|
|
|
|
|
|
|
|
interface IAlbumSource
|
|
|
|
{
|
2016-09-02 22:18:40 +01:00
|
|
|
/**
|
|
|
|
* Gets the absolute path or URL to the given photo file.
|
|
|
|
* @param Album $album
|
|
|
|
* @param Photo $photo
|
|
|
|
* @return string
|
|
|
|
*/
|
2016-09-02 22:00:42 +01:00
|
|
|
function getPathToPhoto(Album $album, Photo $photo);
|
|
|
|
|
2016-09-03 17:09:49 +01:00
|
|
|
function saveThumbnail(Album $album, Photo $photo, $thumbnailImageResource, $thumbnailInfo);
|
|
|
|
|
2016-09-02 22:00:42 +01:00
|
|
|
/**
|
|
|
|
* Saves an uploaded file to the container and returns the filename.
|
|
|
|
* @param Album $album The album containing the photo
|
|
|
|
* @param File $uploadedFile The photo uploaded
|
|
|
|
* @return File
|
|
|
|
*/
|
|
|
|
function saveUploadedPhoto(Album $album, File $uploadedFile);
|
|
|
|
}
|