| 1 | <?php |
||
| 17 | class CallableInterruptNode extends InterruptNodeAbstract |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * @var callable |
||
| 21 | */ |
||
| 22 | protected $interrupter; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Instantiate a CallableInterruptNode Node |
||
| 26 | * |
||
| 27 | * @param callable $interrupter |
||
| 28 | */ |
||
| 29 | public function __construct(callable $interrupter) |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @param mixed $param |
||
| 37 | * |
||
| 38 | * @return InterrupterInterface|null|bool `null` do do nothing, eg let the Flow proceed untouched |
||
| 39 | * `true` to trigger a continue on the carrier Flow (not ancestors) |
||
| 40 | * `false` to trigger a break on the carrier Flow (not ancestors) |
||
| 41 | * `InterrupterInterface` to trigger an interrupt to propagate up to a target (which may be one ancestor) |
||
| 42 | */ |
||
| 43 | public function interrupt($param) |
||
| 47 | } |
||
| 48 |