firefly-iii/app/Repositories/Attachment/AttachmentRepositoryInterface.php

71 lines
1.5 KiB
PHP
Raw Normal View History

2015-07-19 02:37:28 -05:00
<?php
/**
* AttachmentRepositoryInterface.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 05:08:25 -06:00
declare(strict_types = 1);
2015-07-19 02:37:28 -05:00
namespace FireflyIII\Repositories\Attachment;
2016-10-23 02:44:14 -05:00
use Carbon\Carbon;
2015-07-19 02:37:28 -05:00
use FireflyIII\Models\Attachment;
use Illuminate\Support\Collection;
2015-07-19 02:37:28 -05:00
/**
* Interface AttachmentRepositoryInterface
*
* @package FireflyIII\Repositories\Attachment
*/
interface AttachmentRepositoryInterface
{
/**
* @param Attachment $attachment
*
2015-07-26 08:51:07 -05:00
* @return bool
2015-07-19 02:37:28 -05:00
*/
2016-02-06 11:59:48 -06:00
public function destroy(Attachment $attachment): bool;
2015-07-19 02:53:58 -05:00
2016-12-25 05:23:36 -06:00
/**
* @param Attachment $attachment
*
* @return bool
*/
public function exists(Attachment $attachment): bool;
/**
2016-12-30 06:47:23 -06:00
* @return Collection
2016-12-25 05:23:36 -06:00
*/
2016-12-30 06:47:23 -06:00
public function get(): Collection;
2016-12-25 05:23:36 -06:00
2016-10-23 02:44:14 -05:00
/**
* @param Carbon $start
* @param Carbon $end
*
* @return Collection
*/
public function getBetween(Carbon $start, Carbon $end): Collection;
2016-12-30 06:47:23 -06:00
/**
* @param Attachment $attachment
*
* @return string
*/
public function getContent(Attachment $attachment): string;
2015-07-19 02:53:58 -05:00
/**
* @param Attachment $attachment
2015-07-26 08:51:07 -05:00
* @param array $attachmentData
2015-07-19 02:53:58 -05:00
*
2015-07-26 08:51:07 -05:00
* @return Attachment
2015-07-19 02:53:58 -05:00
*/
2016-02-06 11:59:48 -06:00
public function update(Attachment $attachment, array $attachmentData): Attachment;
2015-07-19 02:38:44 -05:00
}
2015-07-19 02:53:58 -05:00