Fixes + added missing directories.
authorRoland Haeder <roland@mxchange.org>
Sun, 5 Apr 2015 23:55:07 +0000 (01:55 +0200)
committerRoland Haeder <roland@mxchange.org>
Sun, 5 Apr 2015 23:55:07 +0000 (01:55 +0200)
Signed-off-by: Roland Haeder <roland@mxchange.org>
application/selector/class_ApplicationHelper.php
application/selector/class_ApplicationSelector.php
application/selector/config.php
application/selector/language/.htaccess [new file with mode: 0644]
application/shipsimu/class_ApplicationHelper.php
application/shipsimu/config.php
application/shipsimu/language/.htaccess [new file with mode: 0644]
application/shipsimu/main/resolver/controller/html/class_ShipSimuHtmlControllerResolver.php
core

index 4f455f340f2795fa268535f6a42b6f7da533cc01..c94407f83d46375bd67957062f8d0a523e5bcd62 100644 (file)
@@ -170,14 +170,14 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
                } // END - if
 
                // ... and a new response object
-               $responseClass = sprintf("%sResponse", $this->convertToClassName($response));
+               $responseClass = sprintf('%sResponse', $this->convertToClassName($response));
                $responseInstance = ObjectFactory::createObjectByName($responseClass, array($this));
 
                // Remember response instance here
                $this->setResponseInstance($responseInstance);
 
                // Get the parameter from the request
-               $commandName = $requestInstance->getRequestElement('command');
+               $commandName = $requestInstance->getRequestElement('page');
 
                // If it is null then get default command
                if (is_null($commandName)) {
@@ -185,7 +185,7 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
                        $commandName = $responseInstance->getDefaultCommand();
 
                        // Set it in request
-                       $requestInstance->setRequestElement('command', $commandName);
+                       $requestInstance->setRequestElement('page', $commandName);
                } // END - if
 
                // Get a controller resolver
@@ -195,10 +195,26 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
                // Get a controller instance as well
                $this->setControllerInstance($resolverInstance->resolveController());
 
+               // Initialize language system
+               $languageInstance = ObjectFactory::createObjectByConfiguredName('language_system_class');
+
+               // And set it here
+               $this->setLanguageInstance($languageInstance);
+
                // Launch the main routine here
                $this->getControllerInstance()->handleRequest($requestInstance, $responseInstance);
        }
 
+       /**
+        * Assigns extra application-depending data
+        *
+        * @param       $templateInstance       An instance of a CompileableTemplate
+        * @return      void
+        * @todo        Nothing to add?
+        */
+       public function assignExtraTemplateData (CompileableTemplate $templateInstance) {
+       }
+
        /**
         * Handle the indexed array of fatal messages and puts them out in an
         * acceptable fasion
index f8e080a254b6eb64fb58714d9e94f37db7fa2dd6..8dd0648a040fceabeee49c7d2333c9519c5f2ae4 100644 (file)
@@ -197,7 +197,7 @@ class ApplicationSelector extends BaseFrameworkSystem {
                        $templateInstance = $this->prepareTemplateInstance($appInstance);
 
                        // Try to load the web template
-                       $templateInstance->loadWebTemplate(sprintf('%s_%s',
+                       $templateInstance->loadHtmlTemplate(sprintf('%s_%s',
                                $this->getConfigInstance()->getConfigEntry('tpl_selector_prefix'),
                                strtolower($appInstance->getAppShortName())
                        ));
index 72a2ca65bce38e8fd6d1c41c36eeb6299c614d88..9aad2f9009a913030efcb461b4921fb8d6571caa 100644 (file)
@@ -28,8 +28,8 @@ $cfg = FrameworkConfiguration::getSelfInstance();
 // CFG: HEADER-CHARSET
 $cfg->setConfigEntry('header_charset', 'utf-8');
 
-// CFG: DEFAULT-WEB-COMMAND
-$cfg->setConfigEntry('default_web_command', 'home');
+// CFG: DEFAULT-SELECTOR-HTML-COMMAND
+$cfg->setConfigEntry('default_selector_html_command', 'home');
 
 // CFG: DEFAULT-IMAGE-COMMAND
 $cfg->setConfigEntry('default_image_command', 'build');
diff --git a/application/selector/language/.htaccess b/application/selector/language/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
index 4f455f340f2795fa268535f6a42b6f7da533cc01..c94407f83d46375bd67957062f8d0a523e5bcd62 100644 (file)
@@ -170,14 +170,14 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
                } // END - if
 
                // ... and a new response object
-               $responseClass = sprintf("%sResponse", $this->convertToClassName($response));
+               $responseClass = sprintf('%sResponse', $this->convertToClassName($response));
                $responseInstance = ObjectFactory::createObjectByName($responseClass, array($this));
 
                // Remember response instance here
                $this->setResponseInstance($responseInstance);
 
                // Get the parameter from the request
-               $commandName = $requestInstance->getRequestElement('command');
+               $commandName = $requestInstance->getRequestElement('page');
 
                // If it is null then get default command
                if (is_null($commandName)) {
@@ -185,7 +185,7 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
                        $commandName = $responseInstance->getDefaultCommand();
 
                        // Set it in request
-                       $requestInstance->setRequestElement('command', $commandName);
+                       $requestInstance->setRequestElement('page', $commandName);
                } // END - if
 
                // Get a controller resolver
@@ -195,10 +195,26 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
                // Get a controller instance as well
                $this->setControllerInstance($resolverInstance->resolveController());
 
+               // Initialize language system
+               $languageInstance = ObjectFactory::createObjectByConfiguredName('language_system_class');
+
+               // And set it here
+               $this->setLanguageInstance($languageInstance);
+
                // Launch the main routine here
                $this->getControllerInstance()->handleRequest($requestInstance, $responseInstance);
        }
 
+       /**
+        * Assigns extra application-depending data
+        *
+        * @param       $templateInstance       An instance of a CompileableTemplate
+        * @return      void
+        * @todo        Nothing to add?
+        */
+       public function assignExtraTemplateData (CompileableTemplate $templateInstance) {
+       }
+
        /**
         * Handle the indexed array of fatal messages and puts them out in an
         * acceptable fasion
index b37151f92278dee29354dd5077bf20a7c498fd93..4b22332cf8a90f18a9331bcb56a7b62c2947301e 100644 (file)
@@ -28,8 +28,11 @@ $cfg = FrameworkConfiguration::getSelfInstance();
 // CFG: HEADER-CHARSET
 $cfg->setConfigEntry('header_charset', 'utf-8');
 
-// CFG: DEFAULT-WEB-COMMAND
-$cfg->setConfigEntry('default_web_command', 'home');
+// CFG: DEFAULT-SHIP-SIMU-HTML-COMMAND
+$cfg->setConfigEntry('default_ship_simu_html_command', 'home');
+
+// CFG: DEFAULT-HTML-COMMAND
+$cfg->setConfigEntry('default_html_command', 'home');
 
 // CFG: DEFAULT-IMAGE-COMMAND
 $cfg->setConfigEntry('default_image_command', 'build');
@@ -184,8 +187,8 @@ $cfg->setConfigEntry('login_register_action_url', 'index.php?app={?app_short_nam
 // CFG: CONFIRM-DIRECT-LOGIN-ACTION-URL
 $cfg->setConfigEntry('confirm_direct_login_action_url', 'index.php?app={?app_short_name?}&amp;page=login_area');
 
-// CFG: WEB-CMD-USER-IS-NULL-URL
-$cfg->setConfigEntry('web_cmd_user_is_null_url', 'index.php?app={?app_short_name?}&amp;page=problem&amp;problem=user_null');
+// CFG: HTML-CMD-USER-IS-NULL-URL
+$cfg->setConfigEntry('html_cmd_user_is_null_url', 'index.php?app={?app_short_name?}&amp;page=problem&amp;problem=user_null');
 
 // CFG: NEWS-READER-HOME-CLASS
 $cfg->setConfigEntry('news_reader_home_class', 'DefaultNewsReader');
@@ -454,47 +457,47 @@ $cfg->setConfigEntry('government_startup_help_limit', 3);
 // CFG: GOVERNMENT-TRAINING-LIMIT
 $cfg->setConfigEntry('government_training_limit', 2);
 
-// CFG: WEB-BLOCK-HELPER
-$cfg->setConfigEntry('web_block_helper', 'WebBlockHelper');
+// CFG: HTML-BLOCK-HELPER
+$cfg->setConfigEntry('html_block_helper', 'HtmlBlockHelper');
 
-// CFG: WEB-FORM-HELPER
-$cfg->setConfigEntry('web_form_helper', 'WebFormHelper');
+// CFG: HTML-FORM-HELPER
+$cfg->setConfigEntry('html_form_helper', 'HtmlFormHelper');
 
-// CFG: WEB-LINK-HELPER
-$cfg->setConfigEntry('web_link_helper', 'WebLinkHelper');
+// CFG: HTML-LINK-HELPER
+$cfg->setConfigEntry('html_link_helper', 'HtmlLinkHelper');
 
-// CFG: WEB-CMD-GOVERNMENT-FAILED-RESOLVER-CLASS
-$cfg->setConfigEntry('web_cmd_government_failed_resolver_class', 'WebGovernmentFailedCommandResolver');
+// CFG: HTML-CMD-GOVERNMENT-FAILED-RESOLVER-CLASS
+$cfg->setConfigEntry('html_cmd_government_failed_resolver_class', 'HtmlGovernmentFailedCommandResolver');
 
-// CFG: WEB-CMD-LOGIN-FAILED-RESOLVER-CLASS
-$cfg->setConfigEntry('web_cmd_login_failed_resolver_class', 'WebCommandResolver');
+// CFG: HTML-CMD-LOGIN-FAILED-RESOLVER-CLASS
+$cfg->setConfigEntry('html_cmd_login_failed_resolver_class', 'HtmlCommandResolver');
 
-// CFG: WEB-CMD-COMPANY-RESOLVER-CLASS
-$cfg->setConfigEntry('web_cmd_company_resolver_class', 'WebCompanyCommandResolver');
+// CFG: HTML-CMD-COMPANY-RESOLVER-CLASS
+$cfg->setConfigEntry('html_cmd_company_resolver_class', 'HtmlCompanyCommandResolver');
 
-// CFG: WEB-CMD-HOME-RESOLVER-CLASS
-$cfg->setConfigEntry('web_cmd_home_resolver_class', 'WebCommandResolver');
+// CFG: HTML-CMD-HOME-RESOLVER-CLASS
+$cfg->setConfigEntry('html_cmd_home_resolver_class', 'HtmlCommandResolver');
 
-// CFG: WEB-CMD-REGISTER-RESOLVER-CLASS
-$cfg->setConfigEntry('web_cmd_register_resolver_class', 'WebCommandResolver');
+// CFG: HTML-CMD-REGISTER-RESOLVER-CLASS
+$cfg->setConfigEntry('html_cmd_register_resolver_class', 'HtmlCommandResolver');
 
-// CFG: WEB-CMD-DO-FORM-RESOLVER-CLASS
-$cfg->setConfigEntry('web_cmd_do_form_resolver_class', 'WebCommandResolver');
+// CFG: HTML-CMD-DO-FORM-RESOLVER-CLASS
+$cfg->setConfigEntry('html_cmd_do_form_resolver_class', 'HtmlCommandResolver');
 
-// CFG: WEB-CMD-LOGIN-AREA-RESOLVER-CLASS
-$cfg->setConfigEntry('web_cmd_login_area_resolver_class', 'WebCommandResolver');
+// CFG: HTML-CMD-LOGIN-AREA-RESOLVER-CLASS
+$cfg->setConfigEntry('html_cmd_login_area_resolver_class', 'HtmlCommandResolver');
 
-// CFG: WEB-CMD-CONFIRM-RESOLVER-CLASS
-$cfg->setConfigEntry('web_cmd_confirm_resolver_class', 'WebCommandResolver');
+// CFG: HTML-CMD-CONFIRM-RESOLVER-CLASS
+$cfg->setConfigEntry('html_cmd_confirm_resolver_class', 'HtmlCommandResolver');
 
-// CFG: WEB-CMD-PROBLEM-RESOLVER-CLASS
-$cfg->setConfigEntry('web_cmd_problem_resolver_class', 'WebCommandResolver');
+// CFG: HTML-CMD-PROBLEM-RESOLVER-CLASS
+$cfg->setConfigEntry('html_cmd_problem_resolver_class', 'HtmlCommandResolver');
 
-// CFG: WEB-CMD-LOGOUT-RESOLVER-CLASS
-$cfg->setConfigEntry('web_cmd_logout_resolver_class', 'WebCommandResolver');
+// CFG: HTML-CMD-LOGOUT-RESOLVER-CLASS
+$cfg->setConfigEntry('html_cmd_logout_resolver_class', 'HtmlCommandResolver');
 
-// CFG: WEB-CMD-LOGOUT-DONE-RESOLVER-CLASS
-$cfg->setConfigEntry('web_cmd_logout_done_resolver_class', 'WebCommandResolver');
+// CFG: HTML-CMD-LOGOUT-DONE-RESOLVER-CLASS
+$cfg->setConfigEntry('html_cmd_logout_done_resolver_class', 'HtmlCommandResolver');
 
 // CFG: REFILL-REQUEST-CURRENCY-PAYMENT-TYPE
 $cfg->setConfigEntry('refill_request_currency_payment_type', 'test');
diff --git a/application/shipsimu/language/.htaccess b/application/shipsimu/language/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
index 9f18f22afb4cdcdd443c78593cc5d11748c931ad..dc5748319075ad6666b48dbf3edfb6e34e9f316b 100644 (file)
@@ -31,8 +31,8 @@ class ShipSimuHtmlControllerResolver extends BaseControllerResolver implements C
                // Call parent constructor
                parent::__construct(__CLASS__);
 
-               // Set prefix to 'ShipSimuHtml'
-               $this->setClassPrefix('ShipSimuHtml');
+               // Set prefix to 'html'
+               $this->setClassPrefix('html');
        }
 
        /**
diff --git a/core b/core
index 6a1f1d3ccf79613ad0792e206fd2c1932dbb291e..5577e5acf2839a1bfa9778c3c70381e44e196b19 160000 (submodule)
--- a/core
+++ b/core
@@ -1 +1 @@
-Subproject commit 6a1f1d3ccf79613ad0792e206fd2c1932dbb291e
+Subproject commit 5577e5acf2839a1bfa9778c3c70381e44e196b19