1 | <?php declare(strict_types = 1); |
||
22 | abstract class AbstractDefinition |
||
23 | { |
||
24 | /** @var AbstractDefinition Parent definition */ |
||
25 | protected $parentDefinition; |
||
26 | |||
27 | /** |
||
28 | * AbstractDefinition constructor. |
||
29 | * |
||
30 | * @param AbstractDefinition $parentDefinition |
||
31 | */ |
||
32 | 9 | public function __construct(AbstractDefinition $parentDefinition = null) |
|
36 | |||
37 | /** |
||
38 | * End definition and get control to parent |
||
39 | * |
||
40 | * @return AbstractDefinition |
||
41 | * @throws ParentDefinitionNotFoundException |
||
42 | */ |
||
43 | 8 | public function end(): AbstractDefinition |
|
47 | |||
48 | /** |
||
49 | * Get parent definition |
||
50 | * |
||
51 | * @return AbstractDefinition |
||
52 | * @throws ParentDefinitionNotFoundException |
||
53 | */ |
||
54 | 8 | public function getParentDefinition(): AbstractDefinition |
|
62 | |||
63 | /** |
||
64 | * Get correct value from reference |
||
65 | * |
||
66 | * @param ReferenceInterface $reference |
||
67 | * @return string |
||
68 | * @throws ReferenceNotImplementsException |
||
69 | */ |
||
70 | protected function resolveReferenceValue(ReferenceInterface $reference): string |
||
82 | } |
||
83 |