1 | <?php |
||
10 | class ChainExitStrategy implements ExitStrategy |
||
11 | { |
||
12 | private $reason; |
||
13 | |||
14 | /** @var array|ExitStrategy[] */ |
||
15 | private $exitStrategies = []; |
||
16 | |||
17 | /** |
||
18 | * @param array|ExitStrategy[] $exitStrategies |
||
19 | */ |
||
20 | 9 | public function __construct(array $exitStrategies = []) |
|
26 | |||
27 | 8 | public function addExitStrategy(ExitStrategy $exitStrategy) |
|
31 | |||
32 | /** |
||
33 | * {@inheritdoc} |
||
34 | */ |
||
35 | 7 | public function shouldExit($count) |
|
47 | |||
48 | /** |
||
49 | * {@inheritdoc} |
||
50 | */ |
||
51 | 6 | public function getReason() |
|
55 | } |
||
56 |