1 | <?php |
||
28 | class Node |
||
29 | { |
||
30 | use RecordsIterateTrait; |
||
31 | |||
32 | /** |
||
33 | * @var Zone |
||
34 | */ |
||
35 | private $zone; |
||
36 | /** |
||
37 | * @var string |
||
38 | */ |
||
39 | private $name; |
||
40 | /** |
||
41 | * @var RecordAppender |
||
42 | */ |
||
43 | private $recordAppender; |
||
44 | /** |
||
45 | * @var RecordsStore |
||
46 | */ |
||
47 | private $recordsStore; |
||
48 | /** |
||
49 | * @var RecordsStore |
||
50 | */ |
||
51 | private $removedRecordsStore; |
||
52 | |||
53 | /** |
||
54 | * @param Zone $zone |
||
55 | * @param $name |
||
56 | */ |
||
57 | 1 | public function __construct(Zone $zone, string $name) |
|
65 | |||
66 | /** |
||
67 | * @return RecordAppender |
||
68 | */ |
||
69 | 1 | public function getRecordAppender() : RecordAppender |
|
73 | |||
74 | /** |
||
75 | * @return \Generator|Record[] |
||
76 | */ |
||
77 | public function iterateRemoved() : \Generator |
||
83 | |||
84 | /** |
||
85 | * @return RecordsStore |
||
86 | */ |
||
87 | protected function getRemovedRecordsStore() |
||
91 | |||
92 | /** |
||
93 | * @param eRecordType|NULL $type |
||
94 | */ |
||
95 | public function removeRecords(eRecordType $type = NULL) |
||
101 | |||
102 | /** |
||
103 | * @param eRecordType|null $type |
||
104 | * @return \Generator|Record[] |
||
105 | */ |
||
106 | 1 | public function iterateRecords(eRecordType $type = NULL) : \Generator |
|
112 | |||
113 | /** |
||
114 | * @return RecordsStore |
||
115 | */ |
||
116 | 1 | protected function getRecordsStore() : RecordsStore |
|
120 | |||
121 | /** |
||
122 | * @return bool |
||
123 | */ |
||
124 | public function isEmptyNode() : bool |
||
128 | |||
129 | /** |
||
130 | * @internal |
||
131 | * @param Record $record |
||
132 | * @param eRecordNotification $notification |
||
133 | * @return Node |
||
134 | */ |
||
135 | 1 | public function notify(Record $record, eRecordNotification $notification) : Node |
|
149 | |||
150 | 1 | public function sort() |
|
154 | |||
155 | /** |
||
156 | * @internal |
||
157 | * Full validate zone via build in validators |
||
158 | * @return bool |
||
159 | */ |
||
160 | 1 | public function validate() : bool |
|
191 | |||
192 | /** |
||
193 | * @return Zone |
||
194 | */ |
||
195 | 1 | public function getZone() : Zone |
|
199 | |||
200 | /** |
||
201 | * @return string |
||
202 | */ |
||
203 | 1 | public function getName() : string |
|
207 | } |