[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [6996] merge from bim-branch
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [6996] merge from bim-branch |
Date: |
Wed, 16 Feb 2011 09:29:14 +0000 |
Revision: 6996
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6996
Author: sigurdne
Date: 2011-02-16 09:29:14 +0000 (Wed, 16 Feb 2011)
Log Message:
-----------
merge from bim-branch
Added Paths:
-----------
trunk/bim/inc/class.bimobject.inc.php
Copied: trunk/bim/inc/class.bimobject.inc.php (from rev 6995,
branches/dev-bim2/property/inc/class.bimobject.inc.php)
===================================================================
--- trunk/bim/inc/class.bimobject.inc.php (rev 0)
+++ trunk/bim/inc/class.bimobject.inc.php 2011-02-16 09:29:14 UTC (rev
6996)
@@ -0,0 +1,18 @@
+<?php
+class BimObject {
+
+ public function transformObjectToArray() {
+ $reflection = new ReflectionObject($this);
+ $publicMethods =
$reflection->getMethods(ReflectionProperty::IS_PUBLIC);
+ $result = array();
+ foreach($publicMethods as $method) {
+ /* @var $method ReflectionMethod */
+ if(preg_match("/^get(.+)/", $method->getName(),
$matches)) {
+ $memberVarible = lcfirst($matches[1]);
+ $value = $method->invoke($this);
+ $result[$memberVarible] = $value;
+ }
+ }
+ return $result;
+ }
+}
\ No newline at end of file
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [6996] merge from bim-branch,
Sigurd Nes <=