[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [7711]
From: |
Torstein |
Subject: |
[Fmsystem-commits] [7711] |
Date: |
Fri, 23 Sep 2011 06:14:27 +0000 |
Revision: 7711
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7711
Author: vator
Date: 2011-09-23 06:14:27 +0000 (Fri, 23 Sep 2011)
Log Message:
-----------
Modified Paths:
--------------
trunk/controller/inc/model/class.control_area.inc.php
Modified: trunk/controller/inc/model/class.control_area.inc.php
===================================================================
--- trunk/controller/inc/model/class.control_area.inc.php 2011-09-23
06:14:13 UTC (rev 7710)
+++ trunk/controller/inc/model/class.control_area.inc.php 2011-09-23
06:14:27 UTC (rev 7711)
@@ -41,6 +41,34 @@
);
}
+ public function toArray()
+ {
+
+// Alternative 1
+// return get_object_vars($this);
+
+// Alternative 2
+ $exclude = array
+ (
+ 'get_field', // feiler (foreldreklassen)
+ 'get_so',//unødvendig
+ );
+
+ $class_methods = get_class_methods($this);
+ $control_item_arr = array();
+ foreach ($class_methods as $class_method)
+ {
+ if( stripos($class_method , 'get_' ) === 0 &&
!in_array($class_method, $exclude))
+ {
+ $_class_method_part = explode('get_',
$class_method);
+
$control_item_arr[$_class_method_part[1]] = $this->$class_method();
+ }
+ }
+
+// _debug_array($control_item_arr);
+ return $control_item_arr;
+ }
+
/**
* Get a static reference to the storage object associated with
this model object
*
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [7711],
Torstein <=