]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/commands/html/class_HtmlLoginAreaCommand.php
Continued:
[core.git] / framework / main / classes / commands / html / class_HtmlLoginAreaCommand.php
index ba9ed0f6c3bdec1c2ee39cffc0734800637c93c3..e8b8a053bafd0f86b905cc55edae5dc741dfd1b2 100644 (file)
@@ -10,18 +10,18 @@ use Org\Mxchange\CoreFramework\Command\Commandable;
 use Org\Mxchange\CoreFramework\Controller\Controller;
 use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
 use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
 use Org\Mxchange\CoreFramework\Request\Requestable;
 use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
 use Org\Mxchange\CoreFramework\Response\Responseable;
-use Org\Mxchange\CoreFramework\Utils\String\StringUtils;
+use Org\Mxchange\CoreFramework\Utils\Strings\StringUtils;
 
 /**
  * A command for the login area (member/gamer area)
  *
  * @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 - 2023 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -49,7 +49,7 @@ class HtmlLoginAreaCommand extends BaseCommand implements Commandable {
         *
         * @return      void
         */
-       protected function __construct () {
+       private function __construct () {
                // Call parent constructor
                parent::__construct(__CLASS__);
        }
@@ -60,7 +60,7 @@ class HtmlLoginAreaCommand extends BaseCommand implements Commandable {
         * @param       $resolverInstance       An instance of a command resolver class
         * @return      $commandInstance        An instance a prepared command class
         */
-       public static final function createHtmlLoginAreaCommand (CommandResolver $resolverInstance) {
+       public static final function createHtmlLoginAreaCommand (CommandResolver $resolverInstance): Commandable {
                // Get new instance
                $commandInstance = new HtmlLoginAreaCommand();
 
@@ -80,7 +80,7 @@ class HtmlLoginAreaCommand extends BaseCommand implements Commandable {
         * @return      void
         * @todo        Add some stuff here: Some personal data, app/game related data
         */
-       protected function prepareCommand () {
+       protected function prepareCommand (): void {
        }
 
        /**
@@ -90,9 +90,9 @@ class HtmlLoginAreaCommand extends BaseCommand implements Commandable {
         * @param       $responseInstance       An instance of a class with an Responseable interface
         * @return      void
         */
-       public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+       public function execute (Requestable $requestInstance, Responseable $responseInstance): void {
                // Get the action instance from registry
-               $actionInstance = GenericRegistry::getRegistry()->getInstance('action');
+               $actionInstance = ObjectRegistry::getRegistry('generic')->getInstance('action');
 
                // Do we have an action here?
                if ($actionInstance instanceof PerformableAction) {
@@ -174,7 +174,7 @@ class HtmlLoginAreaCommand extends BaseCommand implements Commandable {
         * @param       $requestInstance                An instance of a class with an Requestable interface
         * @return      void
         */
-       public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
+       public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance): void {
                // Get our application instance from the registry
                $applicationInstance = ApplicationHelper::getSelfInstance();
 
@@ -200,7 +200,7 @@ class HtmlLoginAreaCommand extends BaseCommand implements Commandable {
                $actionInstance->addExtraFilters($controllerInstance, $requestInstance);
 
                // Remember this action in registry
-               GenericRegistry::getRegistry()->addInstance('action', $actionInstance);
+               ObjectRegistry::getRegistry('generic')->addInstance('action', $actionInstance);
        }
 
 }