equal
deleted
inserted
replaced
|
1 <?php |
|
2 |
|
3 /** |
|
4 * Copyright(C) 2015 Markus Bröker<broeker.markus@googlemail.com> |
|
5 * |
|
6 */ |
|
7 |
|
8 namespace bfw\mvc\model\home; |
|
9 |
|
10 use bfw\core\Entity; |
|
11 use bfw\core\Model; |
|
12 use bfw\entities\TGroup; |
|
13 use bfw\entities\TUser; |
|
14 |
|
15 class DataModel extends Model { |
|
16 |
|
17 private $user; |
|
18 private $group; |
|
19 |
|
20 /** |
|
21 * Model constructor. |
|
22 */ |
|
23 public function __construct() { |
|
24 $this->user = new TUser(); |
|
25 $this->group = new TGroup(); |
|
26 } |
|
27 |
|
28 /** |
|
29 * @return Entity[] |
|
30 */ |
|
31 public function getUsers() { |
|
32 return $this->user->findAll(); |
|
33 } |
|
34 |
|
35 /** |
|
36 * @return Entity[] |
|
37 */ |
|
38 public function getGroups() { |
|
39 return $this->group->findAll(); |
|
40 } |
|
41 |
|
42 } |