| 1 | <?php |
||
| 9 | final class AuthorizationStack implements AuthorizationInterface |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var AuthorizationInterface[] |
||
| 13 | */ |
||
| 14 | private $authorizations = []; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @param AuthorizationInterface[] $authorizations |
||
| 18 | */ |
||
| 19 | 2 | public function __construct(array $authorizations) |
|
| 25 | |||
| 26 | /** |
||
| 27 | * @param AuthorizationInterface $authorization |
||
| 28 | */ |
||
| 29 | 2 | private function addAuthorization(AuthorizationInterface $authorization) |
|
| 33 | |||
| 34 | /** |
||
| 35 | * @param UserInterface $user |
||
| 36 | * @param mixed $attributes |
||
| 37 | * @param OwnedByUserModelInterface|null $model |
||
| 38 | * |
||
| 39 | * @return bool |
||
| 40 | */ |
||
| 41 | 2 | public function isGranted(UserInterface $user, $attributes, OwnedByUserModelInterface $model = null): bool |
|
| 51 | } |
||
| 52 |