1 | <?php |
||
27 | class Node |
||
28 | { |
||
29 | use RecordsIterateTrait; |
||
30 | |||
31 | /** |
||
32 | * @var Zone |
||
33 | */ |
||
34 | private $zone; |
||
35 | /** |
||
36 | * @var string |
||
37 | */ |
||
38 | private $name; |
||
39 | /** |
||
40 | * @var RecordAppender |
||
41 | */ |
||
42 | private $recordAppender; |
||
43 | /** |
||
44 | * @var RecordsStore |
||
45 | */ |
||
46 | private $recordsStore; |
||
47 | /** |
||
48 | * @var RecordsStore |
||
49 | */ |
||
50 | private $removedRecordsStore; |
||
51 | |||
52 | /** |
||
53 | * @param Zone $zone |
||
54 | * @param $name |
||
55 | */ |
||
56 | 1 | public function __construct(Zone $zone, string $name) |
|
64 | |||
65 | /** |
||
66 | * @return RecordAppender |
||
67 | */ |
||
68 | 1 | public function getRecordAppender() : RecordAppender |
|
72 | |||
73 | /** |
||
74 | * @return Record[] |
||
75 | */ |
||
76 | public function iterateRemoved() |
||
82 | |||
83 | /** |
||
84 | * @return RecordsStore |
||
85 | */ |
||
86 | protected function getRemovedRecordsStore() |
||
90 | |||
91 | /** |
||
92 | * @param eRecordType|NULL $type |
||
93 | */ |
||
94 | public function removeRecords(eRecordType $type = NULL) |
||
100 | |||
101 | /** |
||
102 | * @param eRecordType|null $type |
||
103 | * @return Record[] |
||
104 | */ |
||
105 | 1 | public function iterateRecords(eRecordType $type = NULL) |
|
111 | |||
112 | /** |
||
113 | * @return RecordsStore |
||
114 | */ |
||
115 | 1 | protected function getRecordsStore() : RecordsStore |
|
119 | |||
120 | /** |
||
121 | * @return bool |
||
122 | */ |
||
123 | public function isEmptyNode() : bool |
||
127 | |||
128 | /** |
||
129 | * @internal |
||
130 | * @param Record $record |
||
131 | * @param eRecordNotification $notification |
||
132 | * @return Node |
||
133 | */ |
||
134 | 1 | public function notify(Record $record, eRecordNotification $notification) : Node |
|
148 | |||
149 | 1 | public function sort() |
|
153 | |||
154 | /** |
||
155 | * @internal |
||
156 | * Full validate zone via build in validators |
||
157 | * @return bool |
||
158 | */ |
||
159 | 1 | public function validate() : bool |
|
186 | |||
187 | /** |
||
188 | * @return Zone |
||
189 | */ |
||
190 | 1 | public function getZone() : Zone |
|
194 | |||
195 | /** |
||
196 | * @return string |
||
197 | */ |
||
198 | 1 | public function getName() : string |
|
202 | } |