Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / migrate / src / Plugin / migrate / id_map / NullIdMap.php
1 <?php
2
3 namespace Drupal\migrate\Plugin\migrate\id_map;
4
5 use Drupal\Core\Plugin\PluginBase;
6 use Drupal\migrate\MigrateMessageInterface;
7 use Drupal\migrate\Plugin\MigrateIdMapInterface;
8 use Drupal\migrate\Plugin\MigrationInterface;
9 use Drupal\migrate\Row;
10
11 /**
12  * Defines the null ID map implementation.
13  *
14  * This serves as a dummy in order to not store anything.
15  *
16  * @PluginID("null")
17  */
18 class NullIdMap extends PluginBase implements MigrateIdMapInterface {
19
20   /**
21    * {@inheritdoc}
22    */
23   public function setMessage(MigrateMessageInterface $message) {
24     // Do nothing.
25   }
26
27   /**
28    * {@inheritdoc}
29    */
30   public function getRowBySource(array $source_id_values) {
31     return [];
32   }
33
34   /**
35    * {@inheritdoc}
36    */
37   public function getRowByDestination(array $destination_id_values) {
38     return [];
39   }
40
41   /**
42    * {@inheritdoc}
43    */
44   public function getRowsNeedingUpdate($count) {
45     return 0;
46   }
47
48   /**
49    * {@inheritdoc}
50    */
51   public function lookupSourceID(array $destination_id_values) {
52     return [];
53   }
54
55   /**
56    * {@inheritdoc}
57    */
58   public function lookupDestinationId(array $source_id_values) {
59     return [];
60   }
61
62   /**
63    * {@inheritdoc}
64    */
65   public function lookupDestinationIds(array $source_id_values) {
66     return [];
67   }
68
69   /**
70    * {@inheritdoc}
71    */
72   public function saveIdMapping(Row $row, array $destination_id_values, $source_row_status = MigrateIdMapInterface::STATUS_IMPORTED, $rollback_action = MigrateIdMapInterface::ROLLBACK_DELETE) {
73     // Do nothing.
74   }
75
76   /**
77    * {@inheritdoc}
78    */
79   public function saveMessage(array $source_id_values, $message, $level = MigrationInterface::MESSAGE_ERROR) {
80     // Do nothing.
81   }
82
83   /**
84    * {@inheritdoc}
85    */
86   public function getMessageIterator(array $source_id_values = [], $level = NULL) {
87     return new \ArrayIterator([]);
88   }
89
90   /**
91    * {@inheritdoc}
92    */
93   public function prepareUpdate() {
94     // Do nothing.
95   }
96
97   /**
98    * {@inheritdoc}
99    */
100   public function processedCount() {
101     return 0;
102   }
103
104   /**
105    * {@inheritdoc}
106    */
107   public function importedCount() {
108     return 0;
109   }
110
111   /**
112    * {@inheritdoc}
113    */
114   public function updateCount() {
115     return 0;
116   }
117
118   /**
119    * {@inheritdoc}
120    */
121   public function errorCount() {
122     return 0;
123   }
124
125   /**
126    * {@inheritdoc}
127    */
128   public function messageCount() {
129     return 0;
130   }
131
132   /**
133    * {@inheritdoc}
134    */
135   public function delete(array $source_id_values, $messages_only = FALSE) {
136     // Do nothing.
137   }
138
139   /**
140    * {@inheritdoc}
141    */
142   public function deleteDestination(array $destination_id_values) {
143     // Do nothing.
144   }
145
146   /**
147    * {@inheritdoc}
148    */
149   public function setUpdate(array $source_id_values) {
150     // Do nothing.
151   }
152
153   /**
154    * {@inheritdoc}
155    */
156   public function clearMessages() {
157     // Do nothing.
158   }
159
160   /**
161    * {@inheritdoc}
162    */
163   public function destroy() {
164     // Do nothing.
165   }
166
167   /**
168    * {@inheritdoc}
169    */
170   public function currentDestination() {
171     return NULL;
172   }
173
174   /**
175    * {@inheritdoc}
176    */
177   public function currentSource() {
178     return NULL;
179   }
180
181   /**
182    * {@inheritdoc}
183    */
184   public function getQualifiedMapTableName() {
185     return '';
186   }
187
188   /**
189    * {@inheritdoc}
190    */
191   public function rewind() {
192     return NULL;
193   }
194
195   /**
196    * {@inheritdoc}
197    */
198   public function current() {
199     return NULL;
200   }
201
202   /**
203    * {@inheritdoc}
204    */
205   public function key() {
206     return '';
207   }
208
209   /**
210    * {@inheritdoc}
211    */
212   public function next() {
213     return NULL;
214   }
215
216   /**
217    * {@inheritdoc}
218    */
219   public function valid() {
220     return FALSE;
221   }
222
223 }