2026-03-05 08:26:51 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace MintyPHP\Repository\Access;
|
|
|
|
|
|
2026-03-13 21:58:51 +01:00
|
|
|
/** Contract for permission CRUD and lookup by key or ID. */
|
2026-03-05 08:26:51 +01:00
|
|
|
interface PermissionRepositoryInterface
|
|
|
|
|
{
|
|
|
|
|
public function list(): array;
|
|
|
|
|
|
|
|
|
|
public function listActive(): array;
|
|
|
|
|
|
|
|
|
|
public function listPaged(array $options): array;
|
|
|
|
|
|
|
|
|
|
public function find(int $id): ?array;
|
|
|
|
|
|
|
|
|
|
public function findByKey(string $key): ?array;
|
|
|
|
|
|
|
|
|
|
public function create(array $data): ?int;
|
|
|
|
|
|
|
|
|
|
public function update(int $id, array $data): bool;
|
|
|
|
|
|
|
|
|
|
public function delete(int $id): bool;
|
2026-03-19 18:41:08 +01:00
|
|
|
|
|
|
|
|
/** @return list<array{id: int, key: string, description: string, active: int, is_system: int}> */
|
|
|
|
|
public function listSystem(): array;
|
2026-03-05 08:26:51 +01:00
|
|
|
}
|