Request::hasPost: Array ist immer gesetzt, Inhalt variiert
authorMarkus Bröker <broeker.markus@googlemail.com>
Sat, 14 Nov 2015 02:40:44 +0100
changeset 24 ef2914b7af78
parent 23 975b2839f1f3
child 25 7fddaf017915
Request::hasPost: Array ist immer gesetzt, Inhalt variiert
classes/bfw/Request.php
classes/bfw/core/Controller.php
--- a/classes/bfw/Request.php
+++ b/classes/bfw/Request.php
@@ -139,7 +139,7 @@
      * @return bool
      */
     public static function hasPost() {
-        return (isset($_POST));
+        return (count($_POST) != 0);
     }
 
     /**
--- a/classes/bfw/core/Controller.php
+++ b/classes/bfw/core/Controller.php
@@ -47,7 +47,7 @@
         $this->logger = Logger::getLogger(get_class($this));
     }
 
-    public function getDataModelInstance() {
+    private function getDataModelInstance() {
         $modelName = $this->getModelName();
 
         return new $modelName();
@@ -64,7 +64,7 @@
      * @param $controller
      * @return string
      */
-    public static function mapControllerName($controller) {
+    public static function findControllerInNameSpace($controller) {
         return sprintf('bfw\mvc\controller\%sController', ucfirst($controller));
     }