classes/bfw/mvc/model/dokumentation/DataModel.php
changeset 18 95e61b581061
parent 10 b441d3c0f572
child 28 29a3e34acf64
equal deleted inserted replaced
17:e7d8b7d8852a 18:95e61b581061
     5  *
     5  *
     6  */
     6  */
     7 
     7 
     8 namespace bfw\mvc\model\dokumentation;
     8 namespace bfw\mvc\model\dokumentation;
     9 
     9 
    10 use bfw\core\Entity;
       
    11 use bfw\core\Model;
    10 use bfw\core\Model;
    12 use bfw\entities\TGroup;
       
    13 use bfw\entities\TUser;
       
    14 
    11 
    15 class DataModel extends Model {
    12 class DataModel extends Model {
    16 
    13 
    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 }
    14 }