classes/bfw/mvc/model/dokumentation/DataModel.php
author Markus Bröker <broeker.markus@googlemail.com>
Fri, 13 Nov 2015 15:07:28 +0100
changeset 10 b441d3c0f572
parent 9 classes/bfw/mvc/model/dokumentation/Model.php@8c2f3735a9bd
child 18 95e61b581061
permissions -rw-r--r--
DataModel extends Model ohne Namenskonflikte beim initialen Erzeugen

<?php

/**
 * Copyright(C) 2015 Markus Bröker<broeker.markus@googlemail.com>
 *
 */

namespace bfw\mvc\model\dokumentation;

use bfw\core\Entity;
use bfw\core\Model;
use bfw\entities\TGroup;
use bfw\entities\TUser;

class DataModel extends Model {

    private $user;
    private $group;

    /**
     * Model constructor.
     */
    public function __construct() {
        $this->user = new TUser();
        $this->group = new TGroup();
    }

    /**
     * @return Entity[]
     */
    public function getUsers() {
        return $this->user->findAll();
    }

    /**
     * @return Entity[]
     */
    public function getGroups() {
        return $this->group->findAll();
    }

}