<?php
+// Own namespace
+namespace Org\Mxchange\City\Command;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
+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\Request\Requestable;
+use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
+use Org\Mxchange\CoreFramework\Response\Responseable;
+
/**
* A command for the login area (member/gamer area)
*
* @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
- * @copyright Copyright (c) 2015 City Developer Team
+ * @copyright Copyright (c) 2015, 2016 City Developer Team
* @license GNU GPL 3.0 or any newer version
* @link http://www.shipsimu.org
*
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get the action instance from registry
- $actionInstance = Registry::getRegistry()->getInstance('action');
+ $actionInstance = GenericRegistry::getRegistry()->getInstance('action');
// Do we have an action here?
if ($actionInstance instanceof PerformableAction) {
} // END - if
// Get the application instance
- $applicationInstance = $this->getResolverInstance()->getApplicationInstance();
+ $applicationInstance = ApplicationHelper::getSelfInstance();
// Prepare a template instance
$templateInstance = $this->prepareTemplateInstance($applicationInstance);
$templateInstance->assignConfigVariable('base_url');
// Assign all the application's data with template variables
- $templateInstance->assignApplicationData($applicationInstance);
+ $templateInstance->assignApplicationData();
// Load the master template
$masterTemplate = $applicationInstance->buildMasterTemplateName();
$templateInstance->loadCodeTemplate($masterTemplate);
// Set title
- $templateInstance->assignVariable('title', $this->getLanguageInstance()->getMessage($this->actionName . '_title'));
+ $templateInstance->assignVariable('title', FrameworkBootstrap::getLanguageInstance()->getMessage($this->actionName . '_title'));
// 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.
$actionInstance = NULL;
// Get registry
- $registryInstance = Registry::getRegistry();
+ $registryInstance = GenericRegistry::getRegistry();
// Get our application instance from the registry
$applicationInstance = $registryInstance->getInstance('application');
// Default action is the one from configuration
- $this->actionName = $this->convertDashesToUnderscores($applicationInstance->getAppShortName()) . '_login_' . $this->getConfigInstance()->getConfigEntry('login_default_action');
+ $this->actionName = $this->convertDashesToUnderscores($applicationInstance->getAppShortName()) . '_login_' . FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('login_default_action');
// Get "action" from request
$actReq = $requestInstance->getRequestElement('action');
$this->actionName = $this->convertDashesToUnderscores($applicationInstance->getAppShortName()) . '_login_' . $actReq;
} // END - if
- // Get application instance
- $applicationInstance = $this->getResolverInstance()->getApplicationInstance();
-
// Get a resolver
- $actionResolver = HtmlActionResolver::createHtmlActionResolver($this->actionName, $applicationInstance);
+ $actionResolver = HtmlActionResolver::createHtmlActionResolver($this->actionName);
// Resolve the action
$actionInstance = $actionResolver->resolveAction();
$actionInstance->addExtraFilters($controllerInstance, $requestInstance);
// Remember this action in registry
- Registry::getRegistry()->addInstance('action', $actionInstance);
+ GenericRegistry::getRegistry()->addInstance('action', $actionInstance);
}
-}
-// [EOF]
-?>
+}