config/config.php
changeset 15 560d53f840fa
parent 12 66b604c61e62
child 28 29a3e34acf64
--- a/config/config.php
+++ b/config/config.php
@@ -6,31 +6,12 @@
 
 define('BFW_PATH', dirname(dirname(__FILE__)));
 
-/**
- * Standard-Autoloader für die Basis-Klassen des Projekts
- *
- * @param $class
- * @return bool
- */
-function bfw_autoLoader($class) {
-    $nsClass = str_replace('\\', '/', $class);
-    $filename = sprintf('%s/classes/%s.php', BFW_PATH, $nsClass);
-    $classPath = sprintf('classes/%s.php', $nsClass);
+require_once BFW_PATH . '/classes/bfw/Configuration.php';
+require_once BFW_PATH . '/library/log4php/Logger.php';
 
-    if (file_exists($filename)) {
-        require_once BFW_PATH . "/$classPath";
-
-        return true;
-    }
+Logger::configure(bfw\Configuration::bfw_loggerConfiguration());
+spl_autoload_register('bfw\Configuration::bfw_autoLoader');
 
-    return false;
-}
-
-require_once BFW_PATH . '/library/log4php/Logger.php';
-Logger::configure(BFW_PATH . '/config/log4php.xml');
-
-spl_autoload_register('bfw_autoLoader');
-
-// Durchs Überschreiben habe ich eine eigene Session und teile mir diese nicht mit den 'PHPSESSID' Leuten...
+// Session Handling
 session_name('bfw-id');
 session_start();
\ No newline at end of file