1 | <?php |
||
5 | class ObjectNode implements NodeInterface |
||
6 | { |
||
7 | /** |
||
8 | * @var string |
||
9 | */ |
||
10 | protected $name; |
||
11 | |||
12 | /** |
||
13 | * @var NodeInterface[]|array |
||
14 | */ |
||
15 | protected $children = []; |
||
16 | |||
17 | /** |
||
18 | * @var boolean |
||
19 | */ |
||
20 | protected $allowNoChildren; |
||
21 | |||
22 | /** |
||
23 | * @param string $name |
||
24 | * @param boolean $allowNoChildren |
||
25 | */ |
||
26 | public function __construct($name, $allowNoChildren = false) |
||
31 | |||
32 | /** |
||
33 | * @return string |
||
34 | */ |
||
35 | public function getName() |
||
39 | |||
40 | /** |
||
41 | * @param NodeInterface $node |
||
42 | * @return $this |
||
43 | */ |
||
44 | public function add(NodeInterface $node) |
||
54 | |||
55 | /** |
||
56 | * @param NodeInterface $node |
||
57 | * @return $this |
||
58 | */ |
||
59 | public function remove(NodeInterface $node) |
||
67 | |||
68 | /** |
||
69 | * @return \stdClass|null |
||
70 | */ |
||
71 | public function serialize() |
||
91 | } |
||
92 |