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
|
|
|
|
*
|
2016-10-05 06:52:15 +02:00
|
|
|
* This software may be modified and distributed under the terms of the
|
|
|
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
|
|
|
*
|
|
|
|
* See the LICENSE file for details.
|
2016-05-20 12:27:31 +02:00
|
|
|
*/
|
|
|
|
|
2017-03-24 15:15:12 +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
|
|
|
/**
|
2017-03-24 15:15:12 +01:00
|
|
|
* @param Model $model
|
2015-07-18 21:32:31 +02:00
|
|
|
*
|
2017-02-25 17:39:50 +01:00
|
|
|
* @param null|array $files
|
2017-02-25 05:57:01 +01:00
|
|
|
*
|
2016-01-19 13:59:54 +01:00
|
|
|
* @return bool
|
2015-07-18 21:32:31 +02:00
|
|
|
*/
|
2016-12-28 13:02:56 +01:00
|
|
|
public function saveAttachmentsForModel(Model $model, array $files = null): bool;
|
2015-07-18 21:32:31 +02:00
|
|
|
|
2015-07-19 09:38:44 +02:00
|
|
|
}
|