| 1 | <?php declare(strict_types = 1); |
||
| 17 | abstract class AbstractDefinition |
||
| 18 | { |
||
| 19 | /** @var AbstractDefinition Parent definition */ |
||
| 20 | protected $parentDefinition; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * AbstractDefinition constructor. |
||
| 24 | * |
||
| 25 | * @param AbstractDefinition $parentDefinition |
||
| 26 | */ |
||
| 27 | 46 | public function __construct(AbstractDefinition $parentDefinition = null) |
|
| 31 | |||
| 32 | /** |
||
| 33 | * End definition and get control to parent |
||
| 34 | * |
||
| 35 | * @return AbstractDefinition |
||
| 36 | * @throws ParentDefinitionNotFoundException |
||
| 37 | */ |
||
| 38 | 24 | public function end(): AbstractDefinition |
|
| 42 | |||
| 43 | /** |
||
| 44 | * Get parent definition |
||
| 45 | * |
||
| 46 | * @return AbstractDefinition |
||
| 47 | * @throws ParentDefinitionNotFoundException |
||
| 48 | */ |
||
| 49 | 26 | public function getParentDefinition(): AbstractDefinition |
|
| 57 | } |
||
| 58 |