Commit 73bd522a authored by Alexander Butenko's avatar Alexander Butenko

Fix a typo

parent 29209841
...@@ -57,7 +57,7 @@ abstract class dbObject { ...@@ -57,7 +57,7 @@ abstract class dbObject {
public static function ArrayBuilder () { public static function ArrayBuilder () {
$obj = new static; $obj = new static;
static::$returnType = 'Array'; $obj->returnType = 'Array';
return $obj; return $obj;
} }
......
...@@ -5,6 +5,9 @@ require_once ("models/department.php"); ...@@ -5,6 +5,9 @@ require_once ("models/department.php");
$db = new Mysqlidb('localhost', 'root', '', 'akorbi'); $db = new Mysqlidb('localhost', 'root', '', 'akorbi');
$dept4 = department::ArrayBuilder()->join('user')->get(2);
echo json_encode ($dept4);
$dept = new department(); $dept = new department();
$dept->userid = 10; $dept->userid = 10;
$dept->name = 'avb test'; $dept->name = 'avb test';
...@@ -46,7 +49,5 @@ foreach ($dept3->userid->departments as $d) { ...@@ -46,7 +49,5 @@ foreach ($dept3->userid->departments as $d) {
echo $d; echo $d;
} }
$dept4 = department::ArrayBuilder()->join('user')->get(2);
echo json_encode ($dept4);
?> ?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment