firefly-iii/app/Helpers/Collector/JournalCollectorInterface.php

234 lines
5.6 KiB
PHP
Raw Normal View History

2016-11-08 13:36:09 -06:00
<?php
/**
* JournalCollectorInterface.php
2017-10-21 01:40:00 -05:00
* Copyright (c) 2017 thegrumpydictator@gmail.com
2016-11-08 13:36:09 -06:00
*
2017-10-21 01:40:00 -05:00
* This file is part of Firefly III.
2016-11-08 13:36:09 -06:00
*
2017-10-21 01:40:00 -05:00
* Firefly III is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Firefly III is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
2016-11-08 13:36:09 -06:00
*/
declare(strict_types=1);
2016-11-08 13:36:09 -06:00
namespace FireflyIII\Helpers\Collector;
2016-11-08 13:36:09 -06:00
use Carbon\Carbon;
use FireflyIII\Models\Budget;
use FireflyIII\Models\Category;
use FireflyIII\Models\Tag;
2017-01-30 09:57:00 -06:00
use FireflyIII\User;
2016-11-08 13:36:09 -06:00
use Illuminate\Pagination\LengthAwarePaginator;
use Illuminate\Support\Collection;
/**
* Interface JournalCollectorInterface
*
* @package FireflyIII\Helpers\Collector
*/
interface JournalCollectorInterface
{
/**
2017-04-28 13:08:04 -05:00
* @param string $filter
*
2016-12-03 13:38:13 -06:00
* @return JournalCollectorInterface
*/
2017-04-28 13:08:04 -05:00
public function addFilter(string $filter): JournalCollectorInterface;
2016-12-03 13:38:13 -06:00
2017-10-30 11:28:43 -05:00
/**
* @param string $amount
*
* @return JournalCollectorInterface
*/
public function amountMore(string $amount): JournalCollectorInterface;
/**
* @param string $amount
*
* @return JournalCollectorInterface
*/
public function amountLess(string $amount): JournalCollectorInterface;
/**
* @param string $amount
*
* @return JournalCollectorInterface
*/
public function amountIs(string $amount): JournalCollectorInterface;
2016-12-03 13:38:13 -06:00
/**
2017-04-28 13:08:04 -05:00
* @return int
2016-12-03 13:38:13 -06:00
*/
2017-04-28 13:08:04 -05:00
public function count(): int;
2016-12-03 13:38:13 -06:00
2016-11-08 13:36:09 -06:00
/**
* @return Collection
*/
public function getJournals(): Collection;
/**
* @return LengthAwarePaginator
*/
2016-12-03 13:38:13 -06:00
public function getPaginatedJournals(): LengthAwarePaginator;
2016-11-08 13:36:09 -06:00
2017-04-28 13:08:04 -05:00
/**
* @param string $filter
*
* @return JournalCollectorInterface
*/
public function removeFilter(string $filter): JournalCollectorInterface;
2016-11-08 13:36:09 -06:00
/**
* @param Collection $accounts
*
* @return JournalCollectorInterface
*/
public function setAccounts(Collection $accounts): JournalCollectorInterface;
2017-10-30 11:28:43 -05:00
/**
* @param Carbon $after
*
* @return JournalCollectorInterface
*/
public function setAfter(Carbon $after): JournalCollectorInterface;
2016-11-08 13:36:09 -06:00
/**
* @return JournalCollectorInterface
*/
public function setAllAssetAccounts(): JournalCollectorInterface;
2017-10-30 11:28:43 -05:00
/**
* @param Carbon $before
*
* @return JournalCollectorInterface
*/
public function setBefore(Carbon $before): JournalCollectorInterface;
2016-11-08 13:36:09 -06:00
/**
* @param Collection $bills
*
* @return JournalCollectorInterface
*/
public function setBills(Collection $bills): JournalCollectorInterface;
/**
* @param Budget $budget
*
* @return JournalCollectorInterface
*/
public function setBudget(Budget $budget): JournalCollectorInterface;
/**
* @param Collection $budgets
*
* @return JournalCollectorInterface
*/
public function setBudgets(Collection $budgets): JournalCollectorInterface;
/**
* @param Collection $categories
*
* @return JournalCollectorInterface
*/
public function setCategories(Collection $categories): JournalCollectorInterface;
2016-11-08 13:36:09 -06:00
/**
* @param Category $category
*
* @return JournalCollectorInterface
*/
public function setCategory(Category $category): JournalCollectorInterface;
/**
* @param int $limit
*
* @return JournalCollectorInterface
*/
public function setLimit(int $limit): JournalCollectorInterface;
/**
* @param int $offset
*
* @return JournalCollectorInterface
*/
public function setOffset(int $offset): JournalCollectorInterface;
/**
* @param int $page
*
* @return JournalCollectorInterface
*/
public function setPage(int $page): JournalCollectorInterface;
/**
* @param Carbon $start
* @param Carbon $end
*
* @return JournalCollectorInterface
*/
public function setRange(Carbon $start, Carbon $end): JournalCollectorInterface;
/**
* @param Tag $tag
*
* @return JournalCollectorInterface
*/
public function setTag(Tag $tag): JournalCollectorInterface;
2017-02-24 13:01:35 -06:00
/**
* @param Collection $tags
*
* @return JournalCollectorInterface
*/
public function setTags(Collection $tags): JournalCollectorInterface;
2016-11-08 13:36:09 -06:00
/**
* @param array $types
*
* @return JournalCollectorInterface
*/
public function setTypes(array $types): JournalCollectorInterface;
2017-01-30 09:57:00 -06:00
public function setUser(User $user);
/**
*
*/
public function startQuery();
2016-11-20 11:31:29 -06:00
/**
* @return JournalCollectorInterface
*/
public function withBudgetInformation(): JournalCollectorInterface;
/**
* @return JournalCollectorInterface
*/
public function withCategoryInformation(): JournalCollectorInterface;
2016-11-20 04:43:19 -06:00
/**
* @return JournalCollectorInterface
*/
public function withOpposingAccount(): JournalCollectorInterface;
2016-11-08 13:36:09 -06:00
/**
* @return JournalCollectorInterface
*/
public function withoutBudget(): JournalCollectorInterface;
/**
* @return JournalCollectorInterface
*/
public function withoutCategory(): JournalCollectorInterface;
}