X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Ftemplate%2Fclass_BaseTemplateEngine.php;h=60f5a3cd1433d90e858f91d567c28991b89c49a5;hp=d3fb0d41e9f4cd35311e6e7957b262fe9ff1a0ea;hb=b02b0b6618a1a1d01ce2e0be665d46c5f7b07b11;hpb=c557e49d82bde09ee79542402352a7d31d02bab0 diff --git a/inc/classes/main/template/class_BaseTemplateEngine.php b/inc/classes/main/template/class_BaseTemplateEngine.php index d3fb0d41..60f5a3cd 100644 --- a/inc/classes/main/template/class_BaseTemplateEngine.php +++ b/inc/classes/main/template/class_BaseTemplateEngine.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @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 * @@ -712,7 +712,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem { $this->loadTemplate($template, $ext); } else { // Throw it again - throw new FileIoException($fqfn, FrameworkFileInputPointer::EXCEPTION_FILE_NOT_FOUND); + throw new FileIoException($fqfn, self::EXCEPTION_FILE_NOT_FOUND); } } @@ -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);