]> git.mxchange.org Git - core.git/commitdiff
Now all cfgInstance are rewritten to configInstance
authorRoland Häder <roland@mxchange.org>
Fri, 13 Mar 2009 13:45:51 +0000 (13:45 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 13 Mar 2009 13:45:51 +0000 (13:45 +0000)
inc/classes/main/class_BaseFrameworkSystem.php
inc/classes/main/template/image/class_ImageTemplateEngine.php
inc/classes/main/template/mail/class_MailTemplateEngine.php
inc/classes/main/template/web/class_WebTemplateEngine.php
inc/config/class_FrameworkConfiguration.php
inc/loader/class_ClassLoader.php

index acea78ded4ebb8c49137d5e5648f86ea11c55906..e635ab55824ad9c18fd818a427e0bc8c99da78f8 100644 (file)
@@ -403,11 +403,11 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
        /**
         * Getter for configuration instance
         *
-        * @return      $cfgInstance    Configuration instance
+        * @return      $configInstance         Configuration instance
         */
        public final function getConfigInstance () {
-               $cfgInstance = Registry::getRegistry()->getInstance('config');
-               return $cfgInstance;
+               $configInstance = Registry::getRegistry()->getInstance('config');
+               return $configInstance;
        }
 
        /**
index e5da6137cd2441556dd125bd9ccf9a9754ffff5d..c77556a4507ea977fd8725260c20f492c3814838 100644 (file)
@@ -86,7 +86,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
                }
 
                // Get configuration instance
-               $cfgInstance = FrameworkConfiguration::getInstance();
+               $configInstance = FrameworkConfiguration::getInstance();
 
                // Set the base path
                $tplInstance->setBasePath($basePath);
@@ -96,11 +96,11 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
                $tplInstance->setFileIoInstance($ioInstance);
 
                // Set template extensions
-               $tplInstance->setRawTemplateExtension($cfgInstance->readConfig('raw_template_extension'));
-               $tplInstance->setCodeTemplateExtension($cfgInstance->readConfig('code_template_extension'));
+               $tplInstance->setRawTemplateExtension($configInstance->readConfig('raw_template_extension'));
+               $tplInstance->setCodeTemplateExtension($configInstance->readConfig('code_template_extension'));
 
                // Absolute output path for compiled templates
-               $tplInstance->setCompileOutputPath($cfgInstance->readConfig('base_path') . $cfgInstance->readConfig('compile_output_path'));
+               $tplInstance->setCompileOutputPath($configInstance->readConfig('base_path') . $configInstance->readConfig('compile_output_path'));
 
                // Return the prepared instance
                return $tplInstance;
index 8746c878160788c9ea65f8bf7d30e1409c45bcef..d67651fbf443c82056d0a255fb3355ddf6d2ad8e 100644 (file)
@@ -86,7 +86,7 @@ class MailTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                }
 
                // Get configuration instance
-               $cfgInstance = FrameworkConfiguration::getInstance();
+               $configInstance = FrameworkConfiguration::getInstance();
 
                // Set the base path
                $tplInstance->setBasePath($basePath);
@@ -96,11 +96,11 @@ class MailTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                $tplInstance->setFileIoInstance($ioInstance);
 
                // Set template extensions
-               $tplInstance->setRawTemplateExtension($cfgInstance->readConfig('raw_template_extension'));
-               $tplInstance->setCodeTemplateExtension($cfgInstance->readConfig('code_template_extension'));
+               $tplInstance->setRawTemplateExtension($configInstance->readConfig('raw_template_extension'));
+               $tplInstance->setCodeTemplateExtension($configInstance->readConfig('code_template_extension'));
 
                // Absolute output path for compiled templates
-               $tplInstance->setCompileOutputPath($cfgInstance->readConfig('base_path') . $cfgInstance->readConfig('compile_output_path'));
+               $tplInstance->setCompileOutputPath($configInstance->readConfig('base_path') . $configInstance->readConfig('compile_output_path'));
 
                // Return the prepared instance
                return $tplInstance;
index 047bb4d032c2c11f606703f4dfe5ebac69deacce..fbd5d5724c7515270b28e310f8f25b71610ef666 100644 (file)
@@ -67,7 +67,7 @@ class WebTemplateEngine extends BaseTemplateEngine implements CompileableTemplat
                }
 
                // Get configuration instance
-               $cfgInstance = FrameworkConfiguration::getInstance();
+               $configInstance = FrameworkConfiguration::getInstance();
 
                // Set the base path
                $tplInstance->setBasePath($basePath);
@@ -77,11 +77,11 @@ class WebTemplateEngine extends BaseTemplateEngine implements CompileableTemplat
                $tplInstance->setFileIoInstance($ioInstance);
 
                // Set template extensions
-               $tplInstance->setRawTemplateExtension($cfgInstance->readConfig('raw_template_extension'));
-               $tplInstance->setCodeTemplateExtension($cfgInstance->readConfig('code_template_extension'));
+               $tplInstance->setRawTemplateExtension($configInstance->readConfig('raw_template_extension'));
+               $tplInstance->setCodeTemplateExtension($configInstance->readConfig('code_template_extension'));
 
                // Absolute output path for compiled templates
-               $tplInstance->setCompileOutputPath($cfgInstance->readConfig('base_path') . $cfgInstance->readConfig('compile_output_path'));
+               $tplInstance->setCompileOutputPath($configInstance->readConfig('base_path') . $configInstance->readConfig('compile_output_path'));
 
                // Return the prepared instance
                return $tplInstance;
index e9610ed2e940077657153f312e67cdd8b30743c7..fafc68fd21c9f3aa07c20f88fc5e4546eece5d28 100644 (file)
@@ -36,7 +36,7 @@ class FrameworkConfiguration implements Registerable {
        /**
         * The configuration instance itself
         */
-       private static $cfgInstance = null;
+       private static $configInstance = null;
 
        // Some constants for the configuration system
        const EXCEPTION_CONFIG_ENTRY_IS_EMPTY      = 0x130;
@@ -54,16 +54,16 @@ class FrameworkConfiguration implements Registerable {
        /**
         * Getter for an instance of this class
         *
-        * @return      $cfgInstance    An instance of this class
+        * @return      $configInstance An instance of this class
         */
        public final static function getInstance () {
                // is the instance there?
-               if (is_null(self::$cfgInstance))  {
+               if (is_null(self::$configInstance))  {
                        // Create a config instance
-                       self::$cfgInstance = new FrameworkConfiguration();
+                       self::$configInstance = new FrameworkConfiguration();
                } // END - if
 
-               return self::$cfgInstance;
+               return self::$configInstance;
        }
 
        /**
index 775abf6b947e81693c57af3a872c648185480c8c..ffa07930f1bae1c3677840e426f83bdd18ff90cb 100644 (file)
@@ -25,7 +25,7 @@
  * 1.3
  *  - Constructor is now empty and factory method 'createClassLoader' is created
  *  - renamed loadClasses to scanClassPath
- *  - Added initLoader(), $cfgInstance renamed to $configInstance
+ *  - Added initLoader(), $configInstance renamed to $configInstance
  * 1.2
  *  - ClassLoader rewritten to PHP SPL's own RecursiveIteratorIterator class
  * 1.1
@@ -40,11 +40,6 @@ class ClassLoader {
         */
        private static $selfInstance = null;
 
-       /**
-        * Configuration array
-        */
-       private $cfg = array();
-
        /**
         * Array with all classes
         */
@@ -136,12 +131,12 @@ class ClassLoader {
         */
        protected function initLoader (FrameworkConfiguration $configInstance) {
                // Set configuration instance
-               $this->cfgInstance = $configInstance;
+               $this->configInstance = $configInstance;
 
                // Construct the FQFN for the cache
                if (!defined('DEVELOPER')) {
-                       $this->listCacheFQFN  = $this->cfgInstance->readConfig('local_db_path') . "list-" . $this->cfgInstance->readConfig('app_name') . ".cache";
-                       $this->classCacheFQFN = $this->cfgInstance->readConfig('local_db_path') . "class-" . $this->cfgInstance->readConfig('app_name') . ".cache";
+                       $this->listCacheFQFN  = $this->configInstance->readConfig('local_db_path') . "list-" . $this->configInstance->readConfig('app_name') . ".cache";
+                       $this->classCacheFQFN = $this->configInstance->readConfig('local_db_path') . "class-" . $this->configInstance->readConfig('app_name') . ".cache";
                } // END - if
 
                // Set suffix and prefix from configuration
@@ -320,7 +315,7 @@ class ClassLoader {
                $this->prefix = "config-";
 
                // Set base directory
-               $basePath = sprintf("%sinc/config/", $this->cfgInstance->readConfig('base_path'));
+               $basePath = sprintf("%sinc/config/", $this->configInstance->readConfig('base_path'));
 
                // Load all classes from the config directory
                $this->scanClassPath($basePath);