2015-07-18 02:49:29 -05:00
|
|
|
<?php
|
2016-05-20 05:27:31 -05: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 05:08:25 -06:00
|
|
|
declare(strict_types = 1);
|
2015-07-18 02:49:29 -05:00
|
|
|
namespace FireflyIII\Helpers\Attachments;
|
|
|
|
|
2015-07-18 14:32:31 -05:00
|
|
|
use FireflyIII\Models\Attachment;
|
2015-07-18 02:49:29 -05:00
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
use Illuminate\Support\MessageBag;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Interface AttachmentHelperInterface
|
|
|
|
*
|
|
|
|
* @package FireflyIII\Helpers\Attachments
|
|
|
|
*/
|
|
|
|
interface AttachmentHelperInterface
|
|
|
|
{
|
|
|
|
|
|
|
|
/**
|
2016-01-19 06:59:54 -06:00
|
|
|
* @param Attachment $attachment
|
2015-07-18 02:49:29 -05:00
|
|
|
*
|
2016-02-18 00:21:48 -06:00
|
|
|
* @return string
|
2015-07-18 02:49:29 -05:00
|
|
|
*/
|
2016-02-18 00:21:48 -06:00
|
|
|
public function getAttachmentLocation(Attachment $attachment): string;
|
2015-07-18 02:49:29 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return MessageBag
|
|
|
|
*/
|
2016-02-18 00:21:48 -06:00
|
|
|
public function getErrors(): MessageBag;
|
2015-07-18 02:49:29 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return MessageBag
|
|
|
|
*/
|
2016-02-18 00:21:48 -06:00
|
|
|
public function getMessages(): MessageBag;
|
2015-07-18 02:49:29 -05:00
|
|
|
|
2015-07-18 14:32:31 -05:00
|
|
|
/**
|
2016-01-19 06:59:54 -06:00
|
|
|
* @param Model $model
|
2015-07-18 14:32:31 -05:00
|
|
|
*
|
2016-01-19 06:59:54 -06:00
|
|
|
* @return bool
|
2015-07-18 14:32:31 -05:00
|
|
|
*/
|
2016-02-18 00:21:48 -06:00
|
|
|
public function saveAttachmentsForModel(Model $model): bool;
|
2015-07-18 14:32:31 -05:00
|
|
|
|
2015-07-19 02:38:44 -05:00
|
|
|
}
|