Files
firefly-iii/app/Helpers/Attachments/AttachmentHelperInterface.php

54 lines
1.1 KiB
PHP
Raw Normal View History

2015-07-18 09:49:29 +02:00
<?php
/**
* AttachmentHelperInterface.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* 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-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
*
2017-02-25 05:57:01 +01:00
* @param array $files
*
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
}