Quellcode durchsuchen

fixed dbo to json

tags/0.1.0
Robin Thoni vor 8 Jahren
Ursprung
Commit
fde6b29936
1 geänderte Dateien mit 5 neuen und 1 gelöschten Zeilen
  1. 5
    1
      src/Generator/dbo.php.twig

+ 5
- 1
src/Generator/dbo.php.twig Datei anzeigen

@@ -8,7 +8,11 @@ class {{ dbo_name.camel_upper }} extends LuDbo {
8 8
 
9 9
     public function jsonSerialize()
10 10
     {
11
-        return $this->__toString();
11
+        return array(
12
+{% for column in columns %}
13
+            "{{ column.name.camel_upper }}" => $this->_{{ column.name.camel_lower }}{{ loop.last ? "" : "," }}
14
+{% endfor %}
15
+        );
12 16
     }
13 17
 {% for column in columns %}
14 18
 

Laden…
Abbrechen
Speichern