| 1 | <?php |
||
| 7 | abstract class AbstractNode |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var AbstractParentNode |
||
| 11 | */ |
||
| 12 | protected $parent; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var bool |
||
| 16 | */ |
||
| 17 | protected $allowDefault; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param AbstractParentNode $parent |
||
| 21 | * |
||
| 22 | * @throws \InvalidArgumentException |
||
| 23 | */ |
||
| 24 | 16 | public function setParent(AbstractParentNode $parent) |
|
| 32 | |||
| 33 | /** |
||
| 34 | * @return AbstractParentNode|null |
||
| 35 | */ |
||
| 36 | 7 | public function getParent() |
|
| 40 | |||
| 41 | /** |
||
| 42 | * @return bool |
||
| 43 | */ |
||
| 44 | 4 | public function isAllowDefault(): bool |
|
| 48 | |||
| 49 | /** |
||
| 50 | * @return \stdClass|array|null |
||
| 51 | */ |
||
| 52 | abstract public function getDefault(); |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @return \stdClass|array|string|float|int|bool|null |
||
| 56 | */ |
||
| 57 | abstract public function serialize(); |
||
| 58 | } |
||
| 59 |