]> git.mxchange.org Git - core.git/commitdiff
Simplified some code + fixed set/get usage (should be 'get' here).
authorRoland Haeder <roland@mxchange.org>
Mon, 17 Mar 2014 19:55:49 +0000 (20:55 +0100)
committerRoland Haeder <roland@mxchange.org>
Mon, 17 Mar 2014 19:55:49 +0000 (20:55 +0100)
Signed-off-by: Roland Häder <roland@mxchange.org>
inc/classes/main/template/class_BaseTemplateEngine.php
inc/classes/main/template/image/class_ImageTemplateEngine.php

index d3fb0d41e9f4cd35311e6e7957b262fe9ff1a0ea..8dad7bc040eb713932c31fbf0a9f5e024077efcf 100644 (file)
@@ -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);
index f31f6f042407ac32204834c9dc719a2f02104610..56082432a67364547de3e5253f24c71fae0757be 100644 (file)
@@ -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());
        }
 
        /**