1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace AbterPhp\Admin\Orm; |
||
6 | |||
7 | use AbterPhp\Admin\Domain\Entities\AdminResource as Entity; |
||
8 | use Opulence\Orm\OrmException; |
||
9 | use Opulence\Orm\Repositories\Repository; |
||
10 | |||
11 | class AdminResourceRepo extends Repository |
||
12 | { |
||
13 | /** |
||
14 | * @param string $identifier |
||
15 | * |
||
16 | * @return Entity|null |
||
17 | * @throws OrmException |
||
18 | */ |
||
19 | public function getByIdentifier(string $identifier): ?Entity |
||
20 | { |
||
21 | /** @see AdminResourceSqlDataMapper::getByIdentifier() */ |
||
22 | return $this->getFromDataMapper('getByIdentifier', [$identifier]); |
||
0 ignored issues
–
show
Bug
Best Practice
introduced
by
![]() |
|||
23 | } |
||
24 | /** |
||
25 | * @param string $userId |
||
26 | * |
||
27 | * @return Entity[] |
||
28 | * @throws OrmException |
||
29 | */ |
||
30 | public function getByUserId(string $userId): array |
||
31 | { |
||
32 | /** @see AdminResourceSqlDataMapper::getByUserId() */ |
||
33 | return $this->getFromDataMapper('getByUserId', [$userId]); |
||
0 ignored issues
–
show
|
|||
34 | } |
||
35 | } |
||
36 |