namespace Org\Mxchange\CoreFramework\Command\Register;
// 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\Factory\ObjectFactory;
+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;
*
* @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
*
*
* @return void
*/
- protected function __construct () {
+ private function __construct () {
// Call parent constructor
parent::__construct(__CLASS__);
}
GenericRegistry::getRegistry()->addInstance('extra', $this);
// Get the application instance
- $applicationInstance = GenericRegistry::getRegistry()->getInstance('application');
+ $applicationInstance = ApplicationHelper::getSelfInstance();
// Assign all the application's data with template variables
$this->getTemplateInstance()->assignApplicationData();
$this->getTemplateInstance()->loadCodeTemplate($masterTemplate);
// Set title
- $this->getTemplateInstance()->assignVariable('title', $this->getLanguageInstance()->getMessage('page_register_title'));
+ $this->getTemplateInstance()->assignVariable('title', FrameworkBootstrap::getLanguageInstance()->getMessage('page_register_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.
- $menuInstance = ObjectFactory::createObjectByConfiguredName('register_menu_class', array($applicationInstance));
+ $menuInstance = ObjectFactory::createObjectByConfiguredName('register_menu_class');
// Render the menu
$menuInstance->renderMenu();