Application helper class rewritten, buildMasterTemplateName() method added, Manageabl...
authorRoland Häder <roland@mxchange.org>
Sat, 20 Dec 2008 20:20:05 +0000 (20:20 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 20 Dec 2008 20:20:05 +0000 (20:20 +0000)
inc/classes/interfaces/application/class_ManageableApplication.php
inc/classes/main/commands/web/class_WebConfirmCommand.php
inc/classes/main/commands/web/class_WebHomeCommand.php
inc/classes/main/commands/web/class_WebLoginAreaCommand.php
inc/classes/main/commands/web/class_WebLoginCommand.php
inc/classes/main/commands/web/class_WebLoginFailedCommand.php
inc/classes/main/commands/web/class_WebLogoutDoneCommand.php
inc/classes/main/commands/web/class_WebRegisterCommand.php
inc/classes/main/mailer/debug/class_DebugMailer.php
inc/classes/main/template/class_BaseTemplateEngine.php

index ec0e2b651cf62c89c01d3fbe75d9720d3844a433..e40e58f7d01635d54e60c02e34df9ab97033ac29 100644 (file)
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 interface ManageableApplication extends FrameworkInterface {
-       /**
-        * Getter for application's version number
-        *
-        * @return      $appVersion     The application's version number
-        */
-       function getAppVersion ();
-       /**
-        * Setter for application's version number
-        *
-        * @param               $appVersion     The application's version number
-        * @return      void
-        */
-       function setAppVersion ($appVersion);
-
-       /**
-        * Getter for application's human-readable name
-        *
-        * @return      $appName        The application's name readable for humans
-        */
-       function getAppName ();
-
-       /**
-        * Setter for application's human-readable name
-        *
-        * @param               $appName        The application's name readable for humans
-        * @return      void
-        */
-       function setAppName ($appName);
-
-       /**
-        * Getter for application's short uni*-like name
-        *
-        * @return      $shortName      The application's name readable for humans
-        */
-       function getAppShortName ();
-
-       /**
-        * Setter for application's short uni*-like name
-        *
-        * @param               $shortName      The application's name readable for humans
-        * @return      void
-        */
-       function setAppShortName ($shortName);
-
-       /**
-        * Getter for master template name
-        *
-        * @return      $masterTemplate         Name of the master template
-        */
-       function getMasterTemplate ();
-
        /**
         * Launches the application
         *
@@ -93,6 +42,13 @@ interface ManageableApplication extends FrameworkInterface {
         * @return      void
         */
        function handleFatalMessages (array $messageList);
+
+       /**
+        * Builds the master template's name
+        *
+        * @return      $masterTemplateName             Name of the master template
+        */
+       function buildMasterTemplateName();
 }
 
 // [EOF]
index ca44f8b619a91f4d2fb107b5e7241e397b7fecab..fed2ab9a556bcb13d10763a4dbbe136bd261e685 100644 (file)
@@ -70,7 +70,7 @@ class WebConfirmCommand extends BaseCommand implements Commandable {
                $templateInstance->assignConfigVariable('base_url');
 
                // Load the master template
-               $masterTemplate = $appInstance->getMasterTemplate();
+               $masterTemplate = $appInstance->buildMasterTemplateName();
 
                // Load header template
                $templateInstance->loadCodeTemplate('header');
index 6aad8cfb7f91b926bd8e2b3476141d8e8e324356..cac84cf49c8d6f97676c703dd4d9622f5a824dc7 100644 (file)
@@ -67,7 +67,7 @@ class WebHomeCommand extends BaseCommand implements Commandable {
                $templateInstance->assignApplicationData($appInstance);
 
                // Load the master template
-               $masterTemplate = $appInstance->getMasterTemplate();
+               $masterTemplate = $appInstance->buildMasterTemplateName();
 
                // Load header template
                $templateInstance->loadCodeTemplate('header');
index 749de17491a02c983d10bdf7ae17423844da1b83..ee38a4b76755b934c63755482fe5a6111af7ca2d 100644 (file)
@@ -96,7 +96,7 @@ class WebLoginAreaCommand extends BaseCommand implements Commandable {
                $templateInstance->assignApplicationData($appInstance);
 
                // Load the master template
-               $masterTemplate = $appInstance->getMasterTemplate();
+               $masterTemplate = $appInstance->buildMasterTemplateName();
 
                // Load header template
                $templateInstance->loadCodeTemplate('header');
index 9726e847897f836ebd31443cbfa97771a613f6b8..96d62a4eae735ec163e2a6cc5dd0ab8ecd3a0526 100644 (file)
@@ -70,7 +70,7 @@ class WebLoginCommand extends BaseCommand implements Commandable {
                $templateInstance->assignConfigVariable('base_url');
 
                // Load the master template
-               $masterTemplate = $appInstance->getMasterTemplate();
+               $masterTemplate = $appInstance->buildMasterTemplateName();
 
                // Load header template
                $templateInstance->loadCodeTemplate('header');
index f2b6b81017c1d6d68078a8b10f42acbe099436b4..c9768010eb98f11af072b0fbddcb7b6af7ff91de 100644 (file)
@@ -67,7 +67,7 @@ class WebLoginFailedCommand extends BaseCommand implements Commandable {
                $templateInstance->assignApplicationData($appInstance);
 
                // Load the master template
-               $masterTemplate = $appInstance->getMasterTemplate();
+               $masterTemplate = $appInstance->buildMasterTemplateName();
 
                // Load header template
                $templateInstance->loadCodeTemplate('header');
index 8dfdee365d72be677b3365bcce3f2a77fbed74e4..8d2fc080e1934c32f20feff1d7de837d24109858 100644 (file)
@@ -67,7 +67,7 @@ class WebLogoutDoneCommand extends BaseCommand implements Commandable {
                $templateInstance->assignApplicationData($appInstance);
 
                // Load the master template
-               $masterTemplate = $appInstance->getMasterTemplate();
+               $masterTemplate = $appInstance->buildMasterTemplateName();
 
                // Load header template
                $templateInstance->loadCodeTemplate('header');
index 89c0e9c3e588400858122585c2676ae1e448260f..778228a0af7046395ed423e6c10f327f5b684d5b 100644 (file)
@@ -73,7 +73,7 @@ class WebRegisterCommand extends BaseCommand implements Commandable, Registerabl
                $templateInstance->assignConfigVariable('base_url');
 
                // Load the master template
-               $masterTemplate = $appInstance->getMasterTemplate();
+               $masterTemplate = $appInstance->buildMasterTemplateName();
 
                // Load header template
                $templateInstance->loadCodeTemplate('header');
index 14bdd412db4a536714a6ac233d0be29f3cd2c0fc..21265be85fff22f27983bcae54afb345c292b5d4 100644 (file)
@@ -164,7 +164,7 @@ class DebugMailer extends BaseMailer implements DeliverableMail {
                $templateInstance->assignTemplateWithVariable('footer', 'footer');
 
                // Load the master template
-               $templateInstance->loadCodeTemplate($this->getApplicationInstance()->getMasterTemplate());
+               $templateInstance->loadCodeTemplate($this->getApplicationInstance()->buildMasterTemplateName());
 
                // Then compile it again
                $templateInstance->compileVariables();
index 8690db6fe519d8f038307dbe7684e8712eb56d71..207d53eb4f5ce1d1c8bb8a2070156e042f5deed2 100644 (file)
@@ -1119,7 +1119,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
         */
        protected function loadViewHelper ($helperName) {
                // Make first character upper case, rest low
-               $helperName = ucfirst($helperName);
+               $helperName = $this->convertToClassName($helperName);
 
                // Is this view helper loaded?
                if (!isset($this->helpers[$helperName])) {