+
+ // Return the result
+ return $found;
+ }
+
+ /**
+ * Solver for result index value with call-back method
+ *
+ * @param $databaseColumn Database column where the index might be found
+ * @param $wrapperInstance The wrapper instance to ask for array element
+ * @para $callBack Call-back object for setting the index;
+ * 0=object instance,1=method name
+ * @return void
+4 * @todo Find a caching way without modifying the result array
+ */
+ public function solveResultIndex ($databaseColumn, BaseDatabaseWrapper $wrapperInstance, array $callBack) {
+ // By default nothing is found
+ $indexValue = 0;
+
+ // Is the element in result itself found?
+ if ($this->find($databaseColumn)) {
+ // Use this value
+ $indexValue = $this->getFoundValue();
+ } elseif ($this->find($wrapperInstance->getIndexKey())) {
+ // Use this value
+ $indexValue = $this->getFoundValue();
+ }
+
+ // Set the index
+ call_user_func_array($callBack, array($indexValue));