]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/template/class_BaseTemplateEngine.php
Moved getter near it's setter counter part to have them next to each other.
[core.git] / inc / classes / main / template / class_BaseTemplateEngine.php
index d3fb0d41e9f4cd35311e6e7957b262fe9ff1a0ea..306867ff7b12ec71077acd39767934e6578a853c 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2013 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -471,6 +471,15 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                $this->templateType = (string) $templateType;
        }
 
+       /**
+        * Getter for template type
+        *
+        * @return      $templateType   The current template's type
+        */
+       public final function getTemplateType () {
+               return $this->templateType;
+       }
+
        /**
         * Setter for the last loaded template's FQFN
         *
@@ -579,15 +588,6 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                $this->compileOutputPath = (string) $compileOutputPath;
        }
 
-       /**
-        * Getter for template type
-        *
-        * @return      $templateType   The current template's type
-        */
-       public final function getTemplateType () {
-               return $this->templateType;
-       }
-
        /**
         * Unsets the given offset in the variable group
         *
@@ -725,14 +725,11 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
         * @return      void
         */
        private function loadRawTemplateData ($fqfn) {
-               // Get a input/output instance from the middleware
-               $ioInstance = $this->getFileIoInstance();
-
                // Some debug code to look on the file which is being loaded
                //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: FQFN=' . $fqfn);
 
                // Load the raw template
-               $rawTemplateData = $ioInstance->loadFileContents($fqfn);
+               $rawTemplateData = $this->getFileIoInstance()->loadFileContents($fqfn);
 
                // Store the template's contents into this class
                $this->setRawTemplateData($rawTemplateData);
@@ -1439,13 +1436,10 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
         * @return      void
         */
        protected function loadViewHelper ($helperName) {
-               // Make first character upper case, rest low
-               $helperName = $this->convertToClassName($helperName);
-
                // Is this view helper loaded?
                if (!isset($this->helpers[$helperName])) {
                        // Create a class name
-                       $className = $helperName . 'ViewHelper';
+                       $className = $this->convertToClassName($helperName) . 'ViewHelper';
 
                        // Generate new instance
                        $this->helpers[$helperName] = ObjectFactory::createObjectByName($className);