예제 #1
0
 /**
  * Run startup routine
  *
  * @return void
  */
 public static function startup()
 {
     if (!self::$init) {
         // Autoload all mr_* classes
         mr_autoload::register();
         // Init done!
         self::$init = true;
     }
 }
예제 #2
0
 public function test_unregister()
 {
     mr_autoload::register();
     mr_autoload::unregister();
     $autoloads = spl_autoload_functions();
     $this->assertIsA($autoloads, 'array');
     $found = false;
     foreach ($autoloads as $autoload) {
         if (is_array($autoload) and $autoload[0] instanceof mr_autoload) {
             $found = true;
         }
     }
     $this->assertFalse($found);
 }