| 1 | <?php |
||
| 15 | abstract class FlowAncestryAbstract extends FlowInterruptAbstract |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * The parent Flow, only set when branched |
||
| 19 | * |
||
| 20 | * @var FlowInterface |
||
| 21 | */ |
||
| 22 | public $parent; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Set parent Flow, happens only when branched |
||
| 26 | * |
||
| 27 | * @param FlowInterface $flow |
||
| 28 | * |
||
| 29 | * @return $this |
||
| 30 | */ |
||
| 31 | public function setParent(FlowInterface $flow) |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Get eventual parent Flow |
||
| 40 | * |
||
| 41 | * @return FlowInterface |
||
| 42 | */ |
||
| 43 | public function getParent() |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Tells if this flow has a parent |
||
| 50 | * |
||
| 51 | * @return bool |
||
| 52 | */ |
||
| 53 | public function hasParent() |
||
| 57 | |||
| 58 | /** |
||
| 59 | * Get this Flow's root Flow |
||
| 60 | * |
||
| 61 | * @param FlowInterface $flow Root Flow, or self if root flow |
||
| 62 | * |
||
| 63 | * @return FlowInterface |
||
| 64 | */ |
||
| 65 | public function getRootFlow(FlowInterface $flow) |
||
| 73 | } |
||
| 74 |