]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/actions/post_registration/class_LoginAfterRegistrationAction.php
Continued:
[core.git] / framework / main / classes / actions / post_registration / class_LoginAfterRegistrationAction.php
index 0903d931eb5c3c71e8ff301feceda7b247806d7a..15a884c6fb1f90e2d6c94b522a5b751745657e06 100644 (file)
@@ -14,7 +14,7 @@ use Org\Mxchange\CoreFramework\Response\Responseable;
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 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
  *
@@ -37,7 +37,7 @@ class LoginAfterRegistrationAction extends BaseAction implements PerformableActi
         *
         * @return      void
         */
-       protected function __construct () {
+       private function __construct () {
                // Call parent constructor
                parent::__construct(__CLASS__);
        }
@@ -47,11 +47,13 @@ class LoginAfterRegistrationAction extends BaseAction implements PerformableActi
         *
         * @return      $actionInstance         An instance of this action class
         */
-       public static final function createLoginAfterRegistrationAction () {
+       public static final function createLoginAfterRegistrationAction (): PerformableAction {
                // Get a new instance
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage('LOGIN-REGISTRATION-ACTION: CALLED!');
                $actionInstance = new LoginAfterRegistrationAction();
 
                // Return the instance
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('LOGIN-REGISTRATION-ACTION: actionInstance=%s - EXIT!', $actionInstance->__toString()));
                return $actionInstance;
        }
 
@@ -62,8 +64,9 @@ class LoginAfterRegistrationAction extends BaseAction implements PerformableActi
         * @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 a login class from factory
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('LOGIN-REGISTRATION-ACTION: requestInstance=%s,responseInstance=%s - CALLED!', $requestInstance->__toString(), $responseInstance->__toString()));
                $loginInstance = LoginFactory::createLoginObjectByRequest($requestInstance);
 
                // Login the user by the request instance
@@ -86,6 +89,9 @@ class LoginAfterRegistrationAction extends BaseAction implements PerformableActi
                        // Attach error message to the response
                        $responseInstance->addFatalMessage('failed_login_after_registration');
                }
+
+               // Trace message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage('LOGIN-REGISTRATION-ACTION: EXIT!');
        }
 
 }