From 8fc648e98a3076d9a1e7f6a1da05b28a48769c44 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 23 Jul 2009 19:23:07 +0000 Subject: [PATCH] Variable basePathFile now caches some path and base file information for us --- inc/selector.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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] ?> -- 2.39.5