2018-08-29 06:15:11 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Repositories;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
2022-07-27 15:32:36 +00:00
|
|
|
use Illuminate\Support\Collection;
|
2018-08-29 06:15:11 +00:00
|
|
|
|
|
|
|
interface RepositoryInterface
|
|
|
|
{
|
2024-01-01 20:38:41 +00:00
|
|
|
public function getOne($id): Model;
|
|
|
|
|
|
|
|
public function findOne($id): ?Model;
|
2018-08-29 06:15:11 +00:00
|
|
|
|
2020-12-22 20:11:22 +00:00
|
|
|
/** @return Collection|array<Model> */
|
2024-01-01 20:38:41 +00:00
|
|
|
public function getMany(array $ids, bool $inThatOrder = false): Collection;
|
2018-08-29 06:15:11 +00:00
|
|
|
|
2020-12-22 20:11:22 +00:00
|
|
|
/** @return Collection|array<Model> */
|
2018-08-29 06:15:11 +00:00
|
|
|
public function getAll(): Collection;
|
|
|
|
}
|