*
* @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2013 Core Developer Team
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Core Developer Team
* @license GNU GPL 3.0 or any newer version
* @link http://www.shipsimu.org
*
// Return the value
return $primaryKey;
}
+
+ /**
+ * Removes non-public data from given array.
+ *
+ * @param $data An array with possible non-public data that needs to be removed.
+ * @return $data A cleaned up array with only public data.
+ */
+ public function removeNonPublicDataFromArray (array $data) {
+ // Connect to the database
+ $this->dbLayer->connectToDatabase();
+
+ // Call database backend
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DB-CONNECTION[' . $this->__toString() . ']: Calling this->dbLayer->removeNonPublicDataFromArray(data) ...');
+ $data = $this->dbLayer->removeNonPublicDataFromArray($data);
+
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DB-CONNECTION[' . $this->__toString() . ']: data[]=' . gettype($data));
+ return $data;
+ }
+
+ /**
+ * Count total table rows
+ *
+ * @param $tableName Table name
+ * @return $count Total row count
+ */
+ public function countTotalRows ($tableName) {
+ // Connect to the database
+ $this->dbLayer->connectToDatabase();
+
+ // Ask the database layer
+ $count = $this->dbLayer->countTotalRows($tableName);
+
+ // Return the value
+ return $count;
+ }
}
// [EOF]