Example #1
0
 /**
  * Load basic classes files
  * and nothing more
  */
 public static function autoload()
 {
     if (empty(self::$root_path) || !is_dir(self::$root_path)) {
         throw new exception('Bad root! Use loader::set_root()');
     }
     // composer autoload
     $autoloader_path = self::get_root('vendor/autoload.php');
     if (file_exists($autoloader_path)) {
         self::$composer = (require $autoloader_path);
         self::$with_composer = true;
     }
     /** @todo cache compiled core to apc/memcached */
     if (self::$with_composer) {
         self::preload_core_with_composer(self::$composer);
         // 0.2210 -- 0.2320
     } else {
         self::preload_core(self::$compile);
         // 0.2090 -- 0.2110
     }
 }