1 | <?php |
||
2 | |||
3 | /** |
||
4 | * Spiral Framework. |
||
5 | * |
||
6 | * @license MIT |
||
7 | * @author Anton Titov (Wolfy-J) |
||
8 | */ |
||
9 | |||
10 | declare(strict_types=1); |
||
11 | |||
12 | namespace Cycle\ORM\Parser; |
||
13 | |||
14 | use Cycle\ORM\Exception\ParserException; |
||
15 | |||
16 | /** |
||
17 | * @internal |
||
18 | */ |
||
19 | final class EmbeddedNode extends AbstractNode |
||
20 | { |
||
21 | /** |
||
22 | * @param array $data |
||
23 | */ |
||
24 | protected function push(array &$data): void |
||
25 | { |
||
26 | if ($this->parent === null) { |
||
27 | throw new ParserException('Unable to register data tree, parent is missing'); |
||
28 | } |
||
29 | |||
30 | $this->parent->mount( |
||
31 | $this->container, |
||
32 | $this->outerKey, |
||
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
33 | self::LAST_REFERENCE, |
||
34 | $data |
||
35 | ); |
||
36 | } |
||
37 | } |
||
38 |