From: Roland Haeder Date: Mon, 17 Mar 2014 19:55:49 +0000 (+0100) Subject: Simplified some code + fixed set/get usage (should be 'get' here). X-Git-Url: https://git.mxchange.org/?p=core.git;a=commitdiff_plain;h=fd44a6f6ad63d5e429fb9082d54a69448af024b9 Simplified some code + fixed set/get usage (should be 'get' here). Signed-off-by: Roland Häder --- diff --git a/inc/classes/main/template/class_BaseTemplateEngine.php b/inc/classes/main/template/class_BaseTemplateEngine.php index d3fb0d41..8dad7bc0 100644 --- a/inc/classes/main/template/class_BaseTemplateEngine.php +++ b/inc/classes/main/template/class_BaseTemplateEngine.php @@ -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); diff --git a/inc/classes/main/template/image/class_ImageTemplateEngine.php b/inc/classes/main/template/image/class_ImageTemplateEngine.php index f31f6f04..56082432 100644 --- a/inc/classes/main/template/image/class_ImageTemplateEngine.php +++ b/inc/classes/main/template/image/class_ImageTemplateEngine.php @@ -460,7 +460,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl */ public function getImageCacheFqfn () { // Get the FQFN ready - $fqfn = sprintf("%s%s%s/%s.%s", + $fqfn = sprintf('%s%s%s/%s.%s', $this->getConfigInstance()->getConfigEntry('base_path'), $this->getGenericBasePath(), 'images/_cache', @@ -482,7 +482,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl */ public function transferToResponse (Responseable $responseInstance) { // Set the image instance - $responseInstance->setImageInstance($this->getImageInstance()); + $responseInstance->getImageInstance($this->getImageInstance()); } /**