]> git.mxchange.org Git - core.git/blobdiff - inc/main/classes/controller/class_BaseController.php
Debugging continued:
[core.git] / inc / main / classes / controller / class_BaseController.php
index db7521a562e57dd851e36323390dbb8d33b63d5b..bc257a7b235669773a81f7a1557c466044ce16d7 100644 (file)
@@ -1,4 +1,13 @@
 <?php
+// Own namespace
+namespace CoreFramework\Controller;
+
+// Import framework stuff
+use CoreFramework\Factory\ObjectFactory;
+use CoreFramework\Object\BaseFrameworkSystem;
+use CoreFramework\Registry\Generic\Registry;
+use CoreFramework\Registry\Registerable;
+
 /**
  * A generic controller class. You should extend this base class if you want to
  * write your own controller. You get the advantage that you can use the pre and
@@ -6,7 +15,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -177,9 +186,9 @@ class BaseController extends BaseFrameworkSystem implements Registerable {
         * @return      void
         */
        protected function initFilterChain ($filterChain) {
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CONTROLLER: ' . $filterChain . ' init: START');
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONTROLLER: ' . $filterChain . ' init: START');
                $this->filterChains[$filterChain] = ObjectFactory::createObjectByConfiguredName('filter_chain_class');
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CONTROLLER: ' . $filterChain . ' init: FINISHED');
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONTROLLER: ' . $filterChain . ' init: FINISHED');
        }
 
        /**
@@ -191,7 +200,7 @@ class BaseController extends BaseFrameworkSystem implements Registerable {
         * @throws      InvalidFilterChainException     If the filter chain is invalid
         */
        protected function addFilter ($filterChain, Filterable $filterInstance) {
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CONTROLLER: ' . $filterChain . ',' . $filterInstance->__toString(). ' add: START');
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONTROLLER: ' . $filterChain . ',' . $filterInstance->__toString(). ' add: START');
 
                // Test if the filter is there
                if (!isset($this->filterChains[$filterChain])) {
@@ -201,7 +210,7 @@ class BaseController extends BaseFrameworkSystem implements Registerable {
 
                // Add the filter
                $this->filterChains[$filterChain]->addFilter($filterInstance);
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CONTROLLER: ' . $filterChain . ',' . $filterInstance->__toString(). ' add: FINISH');
+               //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONTROLLER: ' . $filterChain . ',' . $filterInstance->__toString(). ' add: FINISH');
        }
 
        /**
@@ -290,7 +299,5 @@ class BaseController extends BaseFrameworkSystem implements Registerable {
        public function executeShutdownFilters (Requestable $requestInstance, Responseable $responseInstance) {
                $this->executeFilters('shutdown', $requestInstance, $responseInstance);
        }
-}
 
-// [EOF]
-?>
+}