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

66 lines
1.4 KiB
PHP
Raw Normal View History

2015-02-22 02:46:21 -06:00
<?php
namespace FireflyIII\Repositories\Budget;
2015-02-23 14:19:16 -06:00
use Carbon\Carbon;
2015-02-22 02:46:21 -06:00
use FireflyIII\Models\Budget;
2015-02-22 08:40:13 -06:00
use FireflyIII\Models\LimitRepetition;
2015-02-23 14:19:16 -06:00
2015-02-22 02:46:21 -06:00
/**
* Interface BudgetRepositoryInterface
*
* @package FireflyIII\Repositories\Budget
*/
interface BudgetRepositoryInterface
{
2015-02-22 08:40:13 -06:00
/**
* @param Budget $budget
*
* @return boolean
*/
public function destroy(Budget $budget);
2015-02-22 02:46:21 -06:00
/**
* @param Budget $budget
* @param Carbon $date
*
* @return float
*/
public function spentInMonth(Budget $budget, Carbon $date);
/**
* @param Budget $budget
* @param Carbon $date
* @param $amount
*
* @return mixed
*/
public function updateLimitAmount(Budget $budget, Carbon $date, $amount);
2015-02-22 08:40:13 -06:00
/**
* @param array $data
*
* @return Budget
*/
public function store(array $data);
/**
* @param Budget $budget
2015-02-23 14:19:16 -06:00
* @param array $data
2015-02-22 08:40:13 -06: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 14:19:16 -06:00
* @param int $take
2015-02-22 08:40:13 -06:00
*
* @return \Illuminate\Pagination\Paginator
*/
public function getJournals(Budget $budget, LimitRepetition $repetition = null, $take = 50);
2015-02-22 02:46:21 -06:00
}