2026-03-05 08:26:51 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace MintyPHP\Repository\Access;
|
|
|
|
|
|
2026-03-13 21:58:51 +01:00
|
|
|
/** Contract for querying user-role relationships and role usage counts. */
|
2026-03-05 08:26:51 +01:00
|
|
|
interface UserRoleRepositoryInterface
|
|
|
|
|
{
|
|
|
|
|
public function listRoleIdsByUserId(int $userId): array;
|
|
|
|
|
|
|
|
|
|
public function replaceForUser(int $userId, array $roleIds): bool;
|
|
|
|
|
|
|
|
|
|
public function listUserIdsByRoleIds(array $roleIds): array;
|
|
|
|
|
|
|
|
|
|
public function countUsersByRoleIds(array $roleIds): array;
|
|
|
|
|
|
|
|
|
|
public function countActiveUsersByRoleIds(array $roleIds): array;
|
|
|
|
|
}
|