2016-10-15 12:39:34 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* JournalTaskerInterface.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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
declare(strict_types = 1);
|
|
|
|
|
|
|
|
namespace FireflyIII\Repositories\Journal;
|
|
|
|
|
|
|
|
|
|
|
|
use FireflyIII\Models\TransactionJournal;
|
2017-01-30 16:40:49 +01:00
|
|
|
use FireflyIII\User;
|
2016-10-21 19:06:22 +02:00
|
|
|
use Illuminate\Support\Collection;
|
2016-10-15 12:39:34 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Interface JournalTaskerInterface
|
|
|
|
*
|
|
|
|
* @package FireflyIII\Repositories\Journal
|
|
|
|
*/
|
|
|
|
interface JournalTaskerInterface
|
|
|
|
{
|
2017-01-30 16:40:49 +01:00
|
|
|
/**
|
|
|
|
* @param User $user
|
|
|
|
*/
|
|
|
|
public function setUser(User $user);
|
2016-10-21 19:06:22 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @param TransactionJournal $journal
|
|
|
|
*
|
|
|
|
* @return Collection
|
|
|
|
*/
|
|
|
|
public function getPiggyBankEvents(TransactionJournal $journal): Collection;
|
2016-10-15 12:39:34 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get an overview of the transactions of a journal, tailored to the view
|
|
|
|
* that shows a transaction (transaction/show/xx).
|
|
|
|
*
|
|
|
|
* @param TransactionJournal $journal
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function getTransactionsOverview(TransactionJournal $journal): array;
|
2016-10-23 12:42:44 +02:00
|
|
|
}
|