1 | <?php |
||
16 | class AuthMiddleware implements Middleware |
||
17 | { |
||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | private $permission; |
||
22 | /** |
||
23 | * @var User |
||
24 | */ |
||
25 | private $user; |
||
26 | |||
27 | public function __construct(string $permission, User $user) |
||
32 | |||
33 | /** |
||
34 | * @param object $command |
||
35 | * @param callable $next |
||
36 | * |
||
37 | * @return mixed |
||
38 | * @throws InsufficientPermissionsException |
||
39 | * @throws NotAuthenticatedException |
||
40 | */ |
||
41 | public function execute($command, callable $next) |
||
53 | } |
||
54 |