firefly-iii/app/Repositories/ObjectGroup/ObjectGroupRepositoryInterface.php

68 lines
1.9 KiB
PHP
Raw Normal View History

2020-06-07 04:31:01 -05:00
<?php
2020-06-30 12:05:35 -05:00
/**
* ObjectGroupRepositoryInterface.php
* Copyright (c) 2020 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
2020-06-07 04:31:01 -05:00
declare(strict_types=1);
namespace FireflyIII\Repositories\ObjectGroup;
2020-06-20 03:10:55 -05:00
use FireflyIII\Models\ObjectGroup;
2021-04-05 14:52:55 -05:00
use FireflyIII\User;
2023-02-19 01:43:28 -06:00
use Illuminate\Contracts\Auth\Authenticatable;
2020-06-07 04:31:01 -05:00
use Illuminate\Support\Collection;
/**
* Interface ObjectGroupRepositoryInterface
*/
interface ObjectGroupRepositoryInterface
{
/**
2021-03-11 23:20:01 -06:00
* Delete all.
2020-06-07 04:31:01 -05:00
*/
2021-03-11 23:20:01 -06:00
public function deleteAll(): void;
2020-06-07 04:31:01 -05:00
/**
2021-03-11 23:20:01 -06:00
* Delete empty ones.
2020-06-07 04:31:01 -05:00
*/
2021-03-11 23:20:01 -06:00
public function deleteEmpty(): void;
2020-06-07 04:31:01 -05:00
2021-03-11 23:20:01 -06:00
public function destroy(ObjectGroup $objectGroup): void;
public function get(): Collection;
2020-06-07 09:38:15 -05:00
2021-03-11 23:20:01 -06:00
public function getBills(ObjectGroup $objectGroup): Collection;
2020-06-20 09:28:23 -05:00
2021-03-11 23:20:01 -06:00
public function getPiggyBanks(ObjectGroup $objectGroup): Collection;
2021-03-06 08:00:34 -06:00
2021-03-21 03:15:40 -05:00
/**
* Delete all.
*/
public function resetOrder(): void;
2021-03-11 23:20:01 -06:00
public function search(string $query, int $limit): Collection;
2020-06-07 09:38:15 -05:00
2021-03-13 23:20:23 -06:00
public function setOrder(ObjectGroup $objectGroup, int $newOrder): ObjectGroup;
2021-03-11 23:20:01 -06:00
2023-12-20 12:35:52 -06:00
public function setUser(null|Authenticatable|User $user): void;
2021-04-05 14:52:55 -05:00
2020-06-20 03:10:55 -05:00
public function update(ObjectGroup $objectGroup, array $data): ObjectGroup;
2020-06-07 04:31:01 -05:00
}