Files
firefly-iii/app/Repositories/Budget/BudgetRepositoryInterface.php

106 lines
2.1 KiB
PHP
Raw Normal View History

2015-02-22 09:46:21 +01:00
<?php
namespace FireflyIII\Repositories\Budget;
2015-02-23 21:19:16 +01:00
use Carbon\Carbon;
2015-02-22 09:46:21 +01:00
use FireflyIII\Models\Budget;
2015-02-22 15:40:13 +01:00
use FireflyIII\Models\LimitRepetition;
2015-04-05 10:36:28 +02:00
use Illuminate\Support\Collection;
2015-02-23 21:19:16 +01:00
2015-02-22 09:46:21 +01:00
/**
* Interface BudgetRepositoryInterface
*
* @package FireflyIII\Repositories\Budget
*/
interface BudgetRepositoryInterface
{
2015-02-22 15:40:13 +01:00
/**
* @param Budget $budget
*
* @return boolean
*/
public function destroy(Budget $budget);
2015-02-22 09:46:21 +01:00
2015-04-05 10:36:28 +02:00
/**
* @return Collection
*/
public function getActiveBudgets();
/**
* @return Collection
*/
public function getInactiveBudgets();
2015-04-03 19:39:36 +02:00
/**
* @return void
*/
public function cleanupBudgets();
2015-02-22 09:46:21 +01:00
/**
* @param Budget $budget
* @param Carbon $date
*
* @return float
*/
public function spentInMonth(Budget $budget, Carbon $date);
2015-04-05 10:36:28 +02:00
/**
* @param Carbon $start
* @param Carbon $end
*
* @return Collection
*/
public function getWithoutBudget(Carbon $start, Carbon $end);
/**
* @param Budget $budget
*
* @return Collection
*/
public function getBudgetLimits(Budget $budget);
/**
* @param Budget $budget
* @param Carbon $date
*
* @return LimitRepetition|null
*/
public function getCurrentRepetition(Budget $budget, Carbon $date);
2015-02-22 09:46:21 +01:00
/**
* @param Budget $budget
* @param Carbon $date
* @param $amount
*
* @return mixed
*/
public function updateLimitAmount(Budget $budget, Carbon $date, $amount);
2015-02-22 15:40:13 +01:00
/**
* @param array $data
*
* @return Budget
*/
public function store(array $data);
/**
* @param Budget $budget
2015-02-23 21:19:16 +01:00
* @param array $data
2015-02-22 15:40:13 +01:00
*
* @return Budget
*/
public function update(Budget $budget, array $data);
/**
* Returns all the transaction journals for a limit, possibly limited by a limit repetition.
*
* @param Budget $budget
* @param LimitRepetition $repetition
2015-02-23 21:19:16 +01:00
* @param int $take
2015-02-22 15:40:13 +01:00
*
* @return \Illuminate\Pagination\Paginator
*/
public function getJournals(Budget $budget, LimitRepetition $repetition = null, $take = 50);
2015-03-29 08:14:32 +02:00
}