2015-07-18 09:49:29 +02:00
|
|
|
<?php
|
2016-05-20 12:27:31 +02:00
|
|
|
/**
|
|
|
|
* AttachmentHelperInterface.php
|
|
|
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
|
|
|
*
|
|
|
|
* This software may be modified and distributed under the terms
|
|
|
|
* of the MIT license. See the LICENSE file for details.
|
|
|
|
*/
|
|
|
|
|
2016-02-05 12:08:25 +01:00
|
|
|
declare(strict_types = 1);
|
2015-07-18 09:49:29 +02:00
|
|
|
namespace FireflyIII\Helpers\Attachments;
|
|
|
|
|
2015-07-18 21:32:31 +02:00
|
|
|
use FireflyIII\Models\Attachment;
|
2015-07-18 09:49:29 +02:00
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
use Illuminate\Support\MessageBag;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Interface AttachmentHelperInterface
|
|
|
|
*
|
|
|
|
* @package FireflyIII\Helpers\Attachments
|
|
|
|
*/
|
|
|
|
interface AttachmentHelperInterface
|
|
|
|
{
|
|
|
|
|
|
|
|
/**
|
2016-01-19 13:59:54 +01:00
|
|
|
* @param Attachment $attachment
|
2015-07-18 09:49:29 +02:00
|
|
|
*
|
2016-02-18 07:21:48 +01:00
|
|
|
* @return string
|
2015-07-18 09:49:29 +02:00
|
|
|
*/
|
2016-02-18 07:21:48 +01:00
|
|
|
public function getAttachmentLocation(Attachment $attachment): string;
|
2015-07-18 09:49:29 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return MessageBag
|
|
|
|
*/
|
2016-02-18 07:21:48 +01:00
|
|
|
public function getErrors(): MessageBag;
|
2015-07-18 09:49:29 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return MessageBag
|
|
|
|
*/
|
2016-02-18 07:21:48 +01:00
|
|
|
public function getMessages(): MessageBag;
|
2015-07-18 09:49:29 +02:00
|
|
|
|
2015-07-18 21:32:31 +02:00
|
|
|
/**
|
2016-01-19 13:59:54 +01:00
|
|
|
* @param Model $model
|
2015-07-18 21:32:31 +02:00
|
|
|
*
|
2016-01-19 13:59:54 +01:00
|
|
|
* @return bool
|
2015-07-18 21:32:31 +02:00
|
|
|
*/
|
2016-02-18 07:21:48 +01:00
|
|
|
public function saveAttachmentsForModel(Model $model): bool;
|
2015-07-18 21:32:31 +02:00
|
|
|
|
2015-07-19 09:38:44 +02:00
|
|
|
}
|