1: <?php
2:
3: namespace ProgrammingAreHard\Arbiter\Model;
4:
5: use Symfony\Component\Security\Core\User\UserInterface;
6:
7: interface ArbiterInterface extends PermissionsFactoryInterface
8: {
9: /**
10: * Get the user's permissions.
11: *
12: * @param UserInterface $user
13: * @return PermissionsInterface
14: */
15: public function getPermissions(UserInterface $user);
16:
17: /**
18: * Grant the permissions.
19: *
20: * @param UserInterface $user
21: */
22: public function updatePermissions(UserInterface $user, PermissionsInterface $permissions);
23:
24: /**
25: * Check if a user has permissions.
26: *
27: * @param UserInterface $user
28: * @return bool
29: */
30: public function isGranted(UserInterface $user, PermissionsInterface $permissions);
31: }