| 1 | <?php |
||
| 8 | class ValidatorMiddleware implements Middleware |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var ValidatorInterface |
||
| 12 | */ |
||
| 13 | protected $validator; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @param ValidatorInterface $validator |
||
| 17 | */ |
||
| 18 | 12 | public function __construct(ValidatorInterface $validator) |
|
| 22 | |||
| 23 | /** |
||
| 24 | * @param object $command |
||
| 25 | * @param callable $next |
||
| 26 | * |
||
| 27 | * @return mixed |
||
| 28 | * |
||
| 29 | * @throws InvalidCommandException |
||
| 30 | */ |
||
| 31 | 12 | public function execute($command, callable $next) |
|
| 41 | } |
||
| 42 | |||
| 43 |