fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [6943] modelID handling changed


From: Petur Thorsteinsson
Subject: [Fmsystem-commits] [6943] modelID handling changed
Date: Sun, 06 Feb 2011 20:59:47 +0000

Revision: 6943
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6943
Author:   peturbjorn
Date:     2011-02-06 20:59:46 +0000 (Sun, 06 Feb 2011)
Log Message:
-----------
modelID handling changed

Modified Paths:
--------------
    branches/dev-bim2/property/inc/class.sobimitem.inc.php

Modified: branches/dev-bim2/property/inc/class.sobimitem.inc.php
===================================================================
--- branches/dev-bim2/property/inc/class.sobimitem.inc.php      2011-02-06 
20:58:44 UTC (rev 6942)
+++ branches/dev-bim2/property/inc/class.sobimitem.inc.php      2011-02-06 
20:59:46 UTC (rev 6943)
@@ -19,7 +19,7 @@
        public function updateBimItem($bimItem);
        public function getBimItemAttributeValue($bimItemGuid, $attribute);
        public function retrieveItemsByModelId();
-       public function setModelId();
+       public function setModelId($modelId);
 }
 class sobimitem_impl implements sobimitem
 {
@@ -160,11 +160,13 @@
                        }*/
                }
        }
-       
-       public function retrieveItemsByModelId($modelId) {
+       /*
+        * Needs the modelId field set
+        */
+       public function retrieveItemsByModelId() {
                if(empty($this->modelId)) {
                        throw new InvalidArgumentException("Missing modelId!");
-               }
+               } 
                $itemTable = self::bimItemTable;
                $typeTable = self::bimTypeTable;
                $bimItems = array();
@@ -176,9 +178,10 @@
                        } else {
                                while($this->db->next_record())
                                {
-                                       $bimItem = new 
BimItem($this->db->f('id'),$this->db->f('guid'));
-                                       array_push($bimItems, $bimModel);
+                                       $bimItem = new 
BimItem($this->db->f('id'),$this->db->f('guid'),$this->db->f('type'));
+                                       array_push($bimItems, $bimItem);
                                }
+                               return $bimItems;
                        }
                } catch (Exception $e) {
                        throw $e;
@@ -188,7 +191,9 @@
        public function setModelId($modelId) {
                $this->modelId = $modelId;
        }
+       public function getModelId() {
+               return $this->modelId;
+       }
 
-
        
 }
\ No newline at end of file




reply via email to

[Prev in Thread] Current Thread [Next in Thread]