]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/controller/class_BaseController.php
Continued:
[core.git] / framework / main / classes / controller / class_BaseController.php
index 56c0e214a4929041230a07e7c70ffc069b84d11e..8101dc46c0a868d020cabc62bed08753145956cb 100644 (file)
@@ -4,7 +4,7 @@ namespace Org\Mxchange\CoreFramework\Controller;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Chain\Filter\InvalidFilterChainException;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Filter\Filterable;
 use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
@@ -20,7 +20,7 @@ use Org\Mxchange\CoreFramework\Traits\Resolver\ResolverTrait;
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2020 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2022 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -89,7 +89,7 @@ abstract class BaseController extends BaseFrameworkSystem implements Registerabl
                $this->executePreFilters($requestInstance, $responseInstance);
 
                // This request was valid! :-D
-               $requestInstance->requestIsValid();
+               $requestInstance->setIsRequestValid(TRUE);
 
                // Execute the command
                $commandInstance->execute($requestInstance, $responseInstance);
@@ -141,7 +141,7 @@ abstract class BaseController extends BaseFrameworkSystem implements Registerabl
 
                        // Execute *very* generic post filters
                        $this->executePostFilters($requestInstance, $responseInstance);
-               } // END - if
+               }
 
                // Flush the buffer out
                $responseInstance->flushBuffer();
@@ -175,7 +175,7 @@ abstract class BaseController extends BaseFrameworkSystem implements Registerabl
                }
 
                // This request was valid! :-D
-               $requestInstance->requestIsValid();
+               $requestInstance->setIsRequestValid(TRUE);
 
                // Execute the command
                $commandInstance->execute($requestInstance, $responseInstance);
@@ -193,7 +193,7 @@ abstract class BaseController extends BaseFrameworkSystem implements Registerabl
         * @param       $filterChain    Name of the filter chain
         * @return      void
         */
-       protected function initFilterChain ($filterChain) {
+       protected function initFilterChain (string $filterChain) {
                //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONTROLLER: ' . $filterChain . ' init: START');
                $this->filterChains[$filterChain] = ObjectFactory::createObjectByConfiguredName('filter_chain_class');
                //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONTROLLER: ' . $filterChain . ' init: FINISHED');
@@ -207,14 +207,14 @@ abstract class BaseController extends BaseFrameworkSystem implements Registerabl
         * @return      void
         * @throws      InvalidFilterChainException     If the filter chain is invalid
         */
-       protected function addFilter ($filterChain, Filterable $filterInstance) {
+       protected function addFilter (string $filterChain, Filterable $filterInstance) {
                //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONTROLLER: ' . $filterChain . ',' . $filterInstance->__toString(). ' add: START');
 
                // Test if the filter is there
                if (!isset($this->filterChains[$filterChain])) {
                        // Throw an exception here
                        throw new InvalidFilterChainException(array($this, $filterChain), self::EXCEPTION_FILTER_CHAIN_INVALID);
-               } // END - if
+               }
 
                // Add the filter
                $this->filterChains[$filterChain]->addFilter($filterInstance);
@@ -262,12 +262,12 @@ abstract class BaseController extends BaseFrameworkSystem implements Registerabl
         * @return      void
         * @throws      InvalidFilterChainException     If the filter chain is invalid
         */
-       protected function executeFilters ($filterChain, Requestable $requestInstance, Responseable $responseInstance) {
+       protected function executeFilters (string $filterChain, Requestable $requestInstance, Responseable $responseInstance) {
                // Test if the filter is there
                if (!isset($this->filterChains[$filterChain])) {
                        // Throw an exception here
                        throw new InvalidFilterChainException(array($this, $filterChain), self::EXCEPTION_FILTER_CHAIN_INVALID);
-               } // END - if
+               }
 
                // Run all filters
                $this->filterChains[$filterChain]->processFilters($requestInstance, $responseInstance);