Variable basePathFile now caches some path and base file information for us
authorRoland Häder <roland@mxchange.org>
Thu, 23 Jul 2009 19:23:07 +0000 (19:23 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 23 Jul 2009 19:23:07 +0000 (19:23 +0000)
inc/selector.php

index 69dfe73d0ee2f85329e7a6734a7d398cacaf9e8d..0fc66eacc006405a56943f6e3561f93b2d2d5c90 100644 (file)
@@ -34,6 +34,9 @@ $configAppIncludes = array(
        'starter',              // The application starter (calls entryPoint(), etc.)
 );
 
        'starter',              // The application starter (calls entryPoint(), etc.)
 );
 
+// Cache base path/file here
+$basePathFile = FrameworkConfiguration::getInstance()->readConfig('application_path') . FrameworkConfiguration::getInstance()->readConfig('app_name');
+
 // Load them all (try only)
 foreach ($configAppIncludes as $appInc) {
        // Skip starter in test mode
 // Load them all (try only)
 foreach ($configAppIncludes as $appInc) {
        // Skip starter in test mode
@@ -43,7 +46,7 @@ foreach ($configAppIncludes as $appInc) {
        }
 
        // Generate a FQFN for the helper class
        }
 
        // Generate a FQFN for the helper class
-       $appFqFn = FrameworkConfiguration::getInstance()->readConfig('application_path') . FrameworkConfiguration::getInstance()->readConfig('app_name') . '/' . $appInc . '.php';
+       $appFqFn = $basePathFile . '/' . $appInc . '.php';
 
        // Does the include file exists?
        if ((file_exists($appFqFn)) && (is_file($appFqFn)) && (is_readable($appFqFn))) {
 
        // Does the include file exists?
        if ((file_exists($appFqFn)) && (is_file($appFqFn)) && (is_readable($appFqFn))) {
@@ -60,7 +63,7 @@ foreach ($configAppIncludes as $appInc) {
 }
 
 // Remove variables from namespace, which we don't need
 }
 
 // Remove variables from namespace, which we don't need
-unset($appInc, $configAppIncludes, $appFqFn);
+unset($appInc, $configAppIncludes, $appFqFn, $basePathFile);
 
 // [EOF]
 ?>
 
 // [EOF]
 ?>