| 1 | <?php |
||
| 18 | class MultiStrategy implements StrategyInterface |
||
| 19 | { |
||
| 20 | /** @var StrategyInterface[] */ |
||
| 21 | protected $strategies; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * MultiStrategy constructor. |
||
| 25 | * |
||
| 26 | * @param StrategyInterface[] $strategies List of strategies to be applied. |
||
| 27 | */ |
||
| 28 | 4 | public function __construct(array $strategies) |
|
| 32 | |||
| 33 | /** |
||
| 34 | * Applies the defined strategies on the provided request. |
||
| 35 | * |
||
| 36 | * @param Request $request request to handle |
||
| 37 | * |
||
| 38 | * @return string |
||
| 39 | */ |
||
| 40 | public function apply(Request $request) |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Decider to stop other strategies running after from being considered. |
||
| 61 | * |
||
| 62 | * @return boolean |
||
| 63 | */ |
||
| 64 | public function stopPropagation() |
||
| 68 | } |
||
| 69 |