fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [9759]


From: Torstein
Subject: [Fmsystem-commits] [9759]
Date: Wed, 11 Jul 2012 12:40:18 +0000

Revision: 9759
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9759
Author:   vator
Date:     2012-07-11 12:40:17 +0000 (Wed, 11 Jul 2012)
Log Message:
-----------


Modified Paths:
--------------
    trunk/controller/inc/class.socase.inc.php

Modified: trunk/controller/inc/class.socase.inc.php
===================================================================
--- trunk/controller/inc/class.socase.inc.php   2012-07-11 12:39:52 UTC (rev 
9758)
+++ trunk/controller/inc/class.socase.inc.php   2012-07-11 12:40:17 UTC (rev 
9759)
@@ -39,7 +39,7 @@
                /**
                 * Get a static reference to the storage object associated with 
this model object
                 *
-                * @return controller_socontrol_group the storage object
+                * @return controller_socase the storage object
                 */
                public static function get_instance()
                {
@@ -53,6 +53,12 @@
 
                function populate(int $object_id, &$object){}
 
+               /**
+                * Get single case object from database  
+                * 
+                * @param       $case id id of case to be returned
+                * @return case object
+               */
                public function get_single($case_id)
                {
                        $sql = "SELECT * FROM controller_check_item_case "; 
@@ -82,6 +88,14 @@
                        }
                }
                
+               /**
+                * Get cases for message  
+                * 
+                * @param       $location_id location id
+                * @param       $location_item_id location item id
+                * @param $return_type return data as objects or as arrays
+                * @return array of case object represented as objects or arrays
+               */
                public function get_cases_by_message($location_id, 
$location_item_id, $return_type = "return_object")
                {
                        $sql = "SELECT * FROM controller_check_item_case "; 
@@ -111,7 +125,12 @@
                        return $cases_array;
                }
                
-               
+               /**
+                * Inserts a new case in database  
+                * 
+                * @param       $case to inserted
+                * @return true or false
+               */
                function add(&$case)
                {
                        $cols = array(
@@ -145,6 +164,12 @@
                        return isset($result) ? 
$this->db->get_last_insert_id('controller_check_item_case', 'id') : 0;
                }
 
+               /**
+                * Updates an existing case object in database  
+                * 
+                * @param       $case to updated
+                * @return true or false
+               */
                function update($case)
                {
                        $id = $case->get_id();
@@ -174,6 +199,12 @@
                        }
                }
                
+               /**
+                * Delete case in database  
+                * 
+                * @param       $case_id case to be deleted
+                * @return true or false
+               */
                function delete($case_id)
                {
                        $status = $this->db->query("DELETE FROM 
controller_check_item_case WHERE id = $case_id");




reply via email to

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