]> git.mxchange.org Git - core.git/blobdiff - inc/includes.php
Rewritten to register our own __autoload method, loadClasses() renamed to scanClassPath()
[core.git] / inc / includes.php
index b5e6acdcf90fe94afdae28283cea4e28d3fd70dc..246a53253fa8d30b67589d85fece2989023ae28a 100644 (file)
@@ -61,16 +61,8 @@ $application = preg_replace('/([^a-z0-9_-])+/i', "", $application);
 // Set the application name for later usage
 $cfg->setConfigEntry('app_name', $application);
 
-/**
- * Autoload-function
- *
- * @param      $className      Name of the class to load
- * @return     void
- */
-function __autoload ($className) {
-       // Try to include this class
-       ClassLoader::getInstance()->includeClass($className);
-}
+// Register auto-load function with the SPL
+spl_autoload_register("ClassLoader::autoLoad");
 
 /**
  * Is the devel package included?
@@ -79,8 +71,8 @@ if (is_dir(sprintf("%sdevel", $cfg->readConfig('base_path')))) {
        /**
         * Load all development includes
         */
-       ClassLoader::getInstance()->loadClasses('devel');
-}
+       ClassLoader::getInstance()->scanClassPath('devel');
+} // END - if
 
 // [EOF]
 ?>