firefly-iii/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php

89 lines
1.6 KiB
PHP
Raw Normal View History

2015-02-25 12:32:33 -06:00
<?php
namespace FireflyIII\Repositories\PiggyBank;
use FireflyIII\Models\PiggyBank;
2015-02-27 04:02:08 -06:00
use Illuminate\Support\Collection;
2015-02-25 12:32:33 -06:00
/**
* Interface PiggyBankRepositoryInterface
*
* @package FireflyIII\Repositories\PiggyBank
*/
interface PiggyBankRepositoryInterface
{
2015-02-25 12:32:33 -06:00
2015-04-20 14:57:20 -05:00
/**
* @param PiggyBank $piggyBank
2016-02-05 02:25:15 -06:00
* @param string $amount
2015-04-20 14:57:20 -05:00
*
2015-05-25 12:58:13 -05:00
* @return bool
2015-04-20 14:57:20 -05:00
*/
2016-02-05 02:25:15 -06:00
public function createEvent(PiggyBank $piggyBank, string $amount);
2015-04-20 14:57:20 -05:00
/**
* @param PiggyBank $piggyBank
*
* @return bool
*/
2015-05-25 12:58:13 -05:00
public function destroy(PiggyBank $piggyBank);
2015-04-20 14:57:20 -05:00
2015-04-07 10:51:22 -05:00
/**
* @param PiggyBank $piggyBank
*
* @return Collection
*/
public function getEventSummarySet(PiggyBank $piggyBank);
2015-04-20 14:57:20 -05:00
/**
* @param PiggyBank $piggyBank
*
2015-05-25 12:58:13 -05:00
* @return Collection
2015-04-20 14:57:20 -05:00
*/
2015-05-25 12:58:13 -05:00
public function getEvents(PiggyBank $piggyBank);
2016-01-24 13:38:58 -06:00
/**
* @return int
*/
public function getMaxOrder();
2015-05-25 12:58:13 -05:00
/**
* @return Collection
*/
public function getPiggyBanks();
2015-04-20 14:57:20 -05:00
2015-03-15 12:00:33 -05:00
/**
* Set all piggy banks to order 0.
2015-03-29 00:51:56 -05:00
*
2015-03-15 12:00:33 -05:00
* @return void
*/
public function reset();
/**
*
* set id of piggy bank.
*
2015-07-08 23:13:39 -05:00
* @param int $piggyBankId
2015-03-15 12:00:33 -05:00
* @param int $order
*
* @return void
*/
2016-02-05 02:25:15 -06:00
public function setOrder(int $piggyBankId, int $order);
2015-03-15 12:00:33 -05:00
2015-03-07 02:21:06 -06:00
/**
* @param array $data
*
* @return PiggyBank
*/
public function store(array $data);
/**
2015-05-05 03:23:01 -05:00
* @param PiggyBank $piggyBank
* @param array $data
*
* @return PiggyBank
*/
public function update(PiggyBank $piggyBank, array $data);
2015-03-29 01:14:32 -05:00
}