blue-twilight/app/AlbumSources/IAlbumSource.php

44 lines
1.3 KiB
PHP
Raw Normal View History

<?php
namespace App\AlbumSources;
use App\Album;
use App\Photo;
use Symfony\Component\HttpFoundation\File\File;
interface IAlbumSource
{
function getOriginalsFolder();
/**
* 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);
/**
* 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);
/**
* 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);
/**
* Saves an uploaded file to the container and returns the filename.
* @param File $uploadedFile The photo uploaded
* @return File
*/
function saveUploadedPhoto(File $uploadedFile);
}