1 | <?php |
||
7 | final class AuthorizationStack implements AuthorizationInterface |
||
8 | { |
||
9 | /** |
||
10 | * @var AuthorizationInterface[] |
||
11 | */ |
||
12 | private $authorizations = []; |
||
13 | |||
14 | /** |
||
15 | * @param AuthorizationInterface[] $authorizations |
||
16 | */ |
||
17 | public function __construct(array $authorizations) |
||
23 | |||
24 | /** |
||
25 | * @param AuthorizationInterface $authorization |
||
26 | */ |
||
27 | private function addAuthorization(AuthorizationInterface $authorization) |
||
31 | |||
32 | /** |
||
33 | * @param UserInterface $user |
||
34 | * @param mixed $attributes |
||
35 | * @param OwnedByUserModelInterface|null $model |
||
36 | * |
||
37 | * @return bool |
||
38 | */ |
||
39 | public function isGranted(UserInterface $user, $attributes, OwnedByUserModelInterface $model = null): bool |
||
49 | } |
||
50 |