// ... and return it
return $objectList;
}
+
+ /**
+ * Adds all required elements from given array into data set instance
+ *
+ * @param $dataSetInstance An instance of a StoreableCriteria class
+ * @param $nodeData An array with valid node data
+ * @return void
+ */
+ public function addArrayToDataSet (StoreableCriteria $dataSetInstance, array $nodeData) {
+ // Add all data the array provides
+ foreach (NodeDistributedHashTableDatabaseWrapper::getAllElements() as $element) {
+ // Is the element there?
+ if (isset($nodeData[$element])) {
+ // Add it
+ $dataSetInstance->addCriteria($element, $nodeData[$element]);
+ } else {
+ // Output warning message
+ /* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NODE[' . __LINE__ . ']: addArrayToDataSet(): Element ' . $element . ' not found in nodeData array.');
+ }
+ } // END - foreac
+ }
}
// [EOF]