*
* @author Roland Haeder <webmaster@ship-simu.org>
* @version 0.0.0
- * @copyright Copyright (c) 2007 - 2009 Roland Haeder, this is free software
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
* @license GNU GPL 3.0 or any newer version
* @link http://www.ship-simu.org
*
* 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
*/
private static $selfInstance = null;
- /**
- * Configuration array
- */
- private $cfg = array();
-
/**
* Array with all classes
*/
/**
* Filename for the list cache
*/
- private $listCacheFQFN = "";
+ private $listCacheFQFN = '';
/**
* Cache for class content
*/
- private $classCacheFQFN = "";
+ private $classCacheFQFN = '';
/**
* Counter for loaded include files
*/
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
// Skip here if already cached
if ($this->classesCached === false) {
// Generate a full-cache of all classes
- $cacheContent = "";
+ $cacheContent = '';
foreach ($this->loadedClasses as $fqfn) {
// Load the file
$cacheContent .= file_get_contents($fqfn);
// Directories which our class loader ignores by default while
// deep-scanning the directory structure.
- $ignoreList[] = ".";
- $ignoreList[] = "..";
- $ignoreList[] = ".htaccess";
- $ignoreList[] = ".svn";
+ $ignoreList[] = '.';
+ $ignoreList[] = '..';
+ $ignoreList[] = '.htaccess';
+ $ignoreList[] = '.svn';
// Keep it in class for later usage
$this->ignoreList = $ignoreList;
$oldPrefix = $this->prefix;
// Set new prefix (temporary!)
- $this->prefix = "config-";
+ $this->prefix = 'config-';
// Set base directory
- $basePath = sprintf("%sinc/config/", $this->cfgInstance->readConfig('base_path'));
+ $basePath = $this->configInstance->readConfig('base_path') . 'inc/config/';
// Load all classes from the config directory
$this->scanClassPath($basePath);
*/
public function getPrintableIncludeList () {
// Prepare the list
- $includeList = "";
+ $includeList = '';
foreach ($this->loadedClasses as $classFile) {
$includeList .= basename($classFile)."<br />\n";
} // END - foreach