| 1 | <?php |
||
| 7 | class ListStrategy implements StrategyInterface |
||
| 8 | { |
||
| 9 | /** @type \Nubs\Sensible\StrategyInterface[] The strategies to use. */ |
||
| 10 | private $_strategies; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * Initialize the strategy to wrap a list of alternate strategies. |
||
| 14 | * |
||
| 15 | * @param \Nubs\Sensible\StrategyInterface[] $strategies The strategies to |
||
| 16 | * use. |
||
| 17 | */ |
||
| 18 | public function __construct(array $strategies) |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Returns the result of the first successful strategy. |
||
| 25 | * |
||
| 26 | * @return string|null The command as located by a strategy or null if no |
||
| 27 | * strategies found a command to use. |
||
| 28 | */ |
||
| 29 | public function get() |
||
| 40 | } |
||
| 41 |