koel/app/Repositories/RepositoryInterface.php

24 lines
440 B
PHP
Raw Normal View History

2018-08-29 06:15:11 +00:00
<?php
namespace App\Repositories;
2019-06-16 21:14:37 +00:00
use Illuminate\Database\Eloquent\Collection;
2018-08-29 06:15:11 +00:00
use Illuminate\Database\Eloquent\Model;
interface RepositoryInterface
{
public function getModelClass(): string;
/**
* @param int|string $id
*/
public function getOneById($id): ?Model;
/**
* @param int[]|string[] $ids
*/
public function getByIds(array $ids): Collection;
public function getAll(): Collection;
}