| 1 | <?php | ||
| 23 | class ProcessorChain | ||
| 24 | { | ||
| 25 | /** | ||
| 26 | * @var ProcessorInterface[] | ||
| 27 | */ | ||
| 28 | private $processors; | ||
| 29 | |||
| 30 | /** | ||
| 31 | * @param ProcessorInterface[] $processors | ||
| 32 | * | ||
| 33 | * @throws \InvalidArgumentException | ||
| 34 | */ | ||
| 35 | 153 | public function __construct(array $processors) | |
| 36 |     { | ||
| 37 | 153 |         foreach ($processors as $processor) { | |
| 38 | 135 |             if (false === $processor instanceof ProcessorInterface) { | |
| 39 | 3 |                 throw new \InvalidArgumentException('Expected a Nelmio\Alice\ProcessorInterface instance'); | |
| 40 | } | ||
| 41 | 153 | } | |
| 42 | |||
| 43 | 153 | $this->processors = $processors; | |
| 44 | 153 | } | |
| 45 | |||
| 46 | /** | ||
| 47 | * @return array | ||
| 48 | */ | ||
| 49 | 102 | public function getProcessors() | |
| 53 | } | ||
| 54 |