From: Roland Häder Date: Thu, 23 Jul 2009 19:23:07 +0000 (+0000) Subject: Variable basePathFile now caches some path and base file information for us X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8fc648e98a3076d9a1e7f6a1da05b28a48769c44;p=core.git Variable basePathFile now caches some path and base file information for us --- diff --git a/inc/selector.php b/inc/selector.php index 69dfe73d..0fc66eac 100644 --- a/inc/selector.php +++ b/inc/selector.php @@ -34,6 +34,9 @@ $configAppIncludes = array( '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 @@ -43,7 +46,7 @@ foreach ($configAppIncludes as $appInc) { } // 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))) { @@ -60,7 +63,7 @@ foreach ($configAppIncludes as $appInc) { } // Remove variables from namespace, which we don't need -unset($appInc, $configAppIncludes, $appFqFn); +unset($appInc, $configAppIncludes, $appFqFn, $basePathFile); // [EOF] ?>