]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/resolver/action/html/class_HtmlActionResolver.php
Continued:
[core.git] / framework / main / classes / resolver / action / html / class_HtmlActionResolver.php
index eb7862b620d17cc042d40b0a56102255a6d59b31..55a313e8f84c5a5a6bb72c0dbec5adbaa95cb971 100644 (file)
@@ -3,7 +3,7 @@
 namespace Org\Mxchange\CoreFramework\Resolver\Action;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Manager\ManageableApplication;
+use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\Request\Requestable;
 
 // Import SPL stuff
@@ -14,11 +14,7 @@ use \InvalidArgumentException;
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
-<<<<<<< HEAD:framework/main/classes/resolver/action/html/class_HtmlActionResolver.php
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
-=======
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2016 Core Developer Team
->>>>>>> Some updates::inc/main/classes/resolver/action/html/class_HtmlActionResolver.php
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2021 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -46,7 +42,7 @@ class HtmlActionResolver extends BaseActionResolver implements ActionResolver {
         *
         * @return      void
         */
-       protected function __construct () {
+       private function __construct () {
                // Call parent constructor
                parent::__construct(__CLASS__);
 
@@ -58,12 +54,11 @@ class HtmlActionResolver extends BaseActionResolver implements ActionResolver {
         * Creates an instance of a Html action resolver with a given default action
         *
         * @param       $actionName                             The default action we shall execute
-        * @param       $applicationInstance    An instance of a manageable application helper class
         * @return      $resolverInstance               The prepared action resolver instance
         * @throws      InvalidArgumentException        Thrown if default action is not set
         * @throws      InvalidActionException  Thrown if default action is invalid
         */
-       public static final function createHtmlActionResolver ($actionName, ManageableApplication $applicationInstance) {
+       public static final function createHtmlActionResolver ($actionName) {
                // Create the new instance
                $resolverInstance = new HtmlActionResolver();
 
@@ -76,9 +71,6 @@ class HtmlActionResolver extends BaseActionResolver implements ActionResolver {
                        throw new InvalidActionException(array($resolverInstance, $actionName), self::EXCEPTION_INVALID_ACTION);
                }
 
-               // Set the application instance
-               $resolverInstance->setApplicationInstance($applicationInstance);
-
                // Return the prepared instance
                return $resolverInstance;
        }
@@ -104,14 +96,14 @@ class HtmlActionResolver extends BaseActionResolver implements ActionResolver {
 
                // Is the action empty? Then fall back to default action
                if (empty($actionName)) {
-                       $actionName = $this->getConfigInstance()->getConfigEntry('default_action');
-               } // END - if
+                       $actionName = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('default_action');
+               }
 
                // Check if action is valid
                if ($this->isActionValid($actionName) === false) {
                        // This action is invalid!
                        throw new InvalidActionException(array($this, $actionName), self::EXCEPTION_INVALID_ACTION);
-               } // END - if
+               }
 
                // Get the action
                $actionInstance = $this->loadAction();
@@ -120,7 +112,7 @@ class HtmlActionResolver extends BaseActionResolver implements ActionResolver {
                if ((!is_object($actionInstance)) || (!$actionInstance instanceof Actionable)) {
                        // This action has an invalid instance!
                        throw new InvalidActionInstanceException(array($this, $actionName), self::EXCEPTION_INVALID_ACTION);
-               } // END - if
+               }
 
                // Set last action
                $this->setResolvedInstance($actionInstance);
@@ -144,14 +136,14 @@ class HtmlActionResolver extends BaseActionResolver implements ActionResolver {
 
                // Is the action empty? Then fall back to default action
                if (empty($actionName)) {
-                       $actionName = $this->getConfigInstance()->getConfigEntry('default_action');
-               } // END - if
+                       $actionName = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('default_action');
+               }
 
                // Check if action is valid
                if ($this->isActionValid($actionName) === false) {
                        // This action is invalid!
                        throw new InvalidActionException(array($this, $actionName), self::EXCEPTION_INVALID_ACTION);
-               } // END - if
+               }
 
                // Get the action
                $actionInstance = $this->loadAction();