]> git.mxchange.org Git - city.git/blobdiff - application/city/classes/commands/html/class_CityHtmlConfirmCommand.php
Continued:
[city.git] / application / city / classes / commands / html / class_CityHtmlConfirmCommand.php
index fc48015f12475039f5637e0c5fb247d80595f248..77b3d41d44f3f9dc0fbffa10f905db6333d18689 100644 (file)
@@ -1,10 +1,27 @@
 <?php
+// Own namespace
+namespace Org\Mxchange\City\Command;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
+use Org\Mxchange\CoreFramework\Command\BaseCommand;
+use Org\Mxchange\CoreFramework\Command\Commandable;
+use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Database\Frontend\User\UserDatabaseFrontend;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
+use Org\Mxchange\CoreFramework\Generic\NullPointerException;
+use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
+use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
+use Org\Mxchange\CoreFramework\Response\Responseable;
+
 /**
  * A command for the confirmation link handling
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2015, 2016 City Developer Team
+ * @copyright  Copyright (c) 2015 - 2023 City Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -58,13 +75,13 @@ class CityHtmlConfirmCommand extends BaseCommand implements Commandable {
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
                // Get the application instance
-               $applicationInstance = $this->getResolverInstance()->getApplicationInstance();
+               $applicationInstance = ApplicationHelper::getSelfInstance();
 
                // Prepare a template instance
                $templateInstance = $this->prepareTemplateInstance($applicationInstance);
 
                // Assign application data with template engine
-               $templateInstance->assignApplicationData($applicationInstance);
+               $templateInstance->assignApplicationData();
 
                // Assign base URL
                $templateInstance->assignConfigVariable('base_url');
@@ -96,18 +113,18 @@ class CityHtmlConfirmCommand extends BaseCommand implements Commandable {
                $templateInstance->loadCodeTemplate($masterTemplate);
 
                // Set title
-               $templateInstance->assignVariable('title', $this->getLanguageInstance()->getMessage('page_confirm_link_title'));
+               $templateInstance->assignVariable('title', FrameworkBootstrap::getLanguageInstance()->getMessage('page_confirm_link_title'));
 
                // Get user instance
                try {
-                       $userInstance = Registry::getRegistry()->getInstance('user');
+                       $userInstance = GenericRegistry::getRegistry()->getInstance('user');
                } catch (NullPointerException $e) {
                        // Not found user, e.g. when the user is somehow invalid
                        $responseInstance->redirectToConfiguredUrl('html_cmd_user_is_null');
                }
 
                // Set username
-               $templateInstance->assignVariable('username', $userInstance->getField(UserDatabaseWrapper::DB_COLUMN_USERNAME));
+               $templateInstance->assignVariable('username', $userInstance->getField(UserDatabaseFrontend::DB_COLUMN_USERNAME));
 
                // Construct the menu in every command. We could do this in BaseCommand class. But this means
                // *every* command has a navigation system and that is want we don't want.
@@ -141,6 +158,3 @@ class CityHtmlConfirmCommand extends BaseCommand implements Commandable {
                // Empty for now
        }
 }
-
-// [EOF]
-?>