classes/bfw/core/Entity.php
changeset 23 975b2839f1f3
parent 8 54ea0099329c
child 27 79be7d6a2765
--- a/classes/bfw/core/Entity.php
+++ b/classes/bfw/core/Entity.php
@@ -104,13 +104,12 @@
     /**
      * <b>Die Findall Methode erzeugt typsicher den Supertyp</b>
      *
-     * @param bool|false $sys
+     * @param int $initial_id
      * @return Entity[]
      */
-    public function findAll($sys = false) {
-        $this->logger->info(sprintf('%s() ', __METHOD__));
+    public function findAll($initial_id = 1) {
+        $this->logger->info(sprintf('%s(%d) ', __METHOD__, $initial_id));
 
-        $initial_id = ($sys) ? 0 : 1;
         $rows = $this->db->findAll($this->table, $initial_id);
 
         if (count($rows) == 0) {
@@ -229,4 +228,23 @@
         return false;
     }
 
+    /**
+     * Experimental Feature
+     *
+     * @param $array
+     * @return $this
+     */
+    public function merge($array) {
+        $this->data = array_merge($this->data, $array);
+
+        return $this;
+    }
+
+    /**
+     * @return string
+     */
+    public function getLastError() {
+        return $this->db->getLastError();
+    }
+
 }
\ No newline at end of file