DataModel extends Model ohne Namenskonflikte beim initialen Erzeugen
authorMarkus Bröker <broeker.markus@googlemail.com>
Fri, 13 Nov 2015 15:07:28 +0100
changeset 10 b441d3c0f572
parent 9 8c2f3735a9bd
child 11 16e5372a872e
DataModel extends Model ohne Namenskonflikte beim initialen Erzeugen
classes/bfw/core/Controller.php
classes/bfw/mvc/model/benutzerverwaltung/DataModel.php
classes/bfw/mvc/model/benutzerverwaltung/Model.php
classes/bfw/mvc/model/dokumentation/DataModel.php
classes/bfw/mvc/model/dokumentation/Model.php
classes/bfw/mvc/model/error/DataModel.php
classes/bfw/mvc/model/error/Model.php
classes/bfw/mvc/model/home/DataModel.php
classes/bfw/mvc/model/home/Model.php
--- a/classes/bfw/core/Controller.php
+++ b/classes/bfw/core/Controller.php
@@ -123,6 +123,6 @@
         $modelName = str_replace('controller', 'model', get_class($this));
         $modelName = strtolower($modelName);
 
-        return str_replace('controller', '\Model', $modelName);
+        return str_replace('controller', '\DataModel', $modelName);
     }
 }
\ No newline at end of file
rename from classes/bfw/mvc/model/benutzerverwaltung/Model.php
rename to classes/bfw/mvc/model/benutzerverwaltung/DataModel.php
--- a/classes/bfw/mvc/model/benutzerverwaltung/Model.php
+++ b/classes/bfw/mvc/model/benutzerverwaltung/DataModel.php
@@ -8,10 +8,11 @@
 namespace bfw\mvc\model\benutzerverwaltung;
 
 use bfw\core\Entity;
+use bfw\core\Model;
 use bfw\entities\TGroup;
 use bfw\entities\TUser;
 
-class Model extends \bfw\core\Model {
+class DataModel extends Model {
 
     /**
      * @var TUser
rename from classes/bfw/mvc/model/dokumentation/Model.php
rename to classes/bfw/mvc/model/dokumentation/DataModel.php
--- a/classes/bfw/mvc/model/dokumentation/Model.php
+++ b/classes/bfw/mvc/model/dokumentation/DataModel.php
@@ -8,10 +8,11 @@
 namespace bfw\mvc\model\dokumentation;
 
 use bfw\core\Entity;
+use bfw\core\Model;
 use bfw\entities\TGroup;
 use bfw\entities\TUser;
 
-class Model extends \bfw\core\Model {
+class DataModel extends Model {
 
     private $user;
     private $group;
rename from classes/bfw/mvc/model/error/Model.php
rename to classes/bfw/mvc/model/error/DataModel.php
--- a/classes/bfw/mvc/model/error/Model.php
+++ b/classes/bfw/mvc/model/error/DataModel.php
@@ -8,10 +8,11 @@
 namespace bfw\mvc\model\error;
 
 use bfw\core\Entity;
+use bfw\core\Model;
 use bfw\entities\TGroup;
 use bfw\entities\TUser;
 
-class Model extends \bfw\core\Model {
+class DataModel extends Model {
 
     private $user;
     private $group;
rename from classes/bfw/mvc/model/home/Model.php
rename to classes/bfw/mvc/model/home/DataModel.php
--- a/classes/bfw/mvc/model/home/Model.php
+++ b/classes/bfw/mvc/model/home/DataModel.php
@@ -8,11 +8,11 @@
 namespace bfw\mvc\model\home;
 
 use bfw\core\Entity;
-use bfw\core\Model as MyModel;
+use bfw\core\Model;
 use bfw\entities\TGroup;
 use bfw\entities\TUser;
 
-class Model extends MyModel {
+class DataModel extends Model {
 
     private $user;
     private $group;