AutoLoader.php
public static function register($directory, $first = true)
	{
		if($first)
		{
			self::$scannedDirectories[] = $directory;
		}
		$directory = trim($directory, '/');
		$dir       = dir(trim($directory));
		while(false !== $file = $dir->read())
		{
			if($file !== '.' && $file !== '..')
			{
				if(is_dir($directory . DIRECTORY_SEPARATOR . $file))
				{
					self::register($directory . DIRECTORY_SEPARATOR . $file, false);
				}
				elseif(is_file($directory . DIRECTORY_SEPARATOR . $file))
				{
					self::_asd($directory, $file);
				}
			}
		}
		$dir->close();
	}
public static function register($directory, $first = true)
	{
		if($first)
		{
			self::$scannedDirectories[] = $directory;
		}
		$directory = trim($directory, '/');
		$dir       = dir(trim($directory));
		while(false !== $file = $dir->read())
		{
			if($file !== '.' && $file !== '..')
			{
				if(is_dir($directory . DIRECTORY_SEPARATOR . $file))
				{
					self::register($directory . DIRECTORY_SEPARATOR . $file, false);
				}
				elseif(is_file($directory . DIRECTORY_SEPARATOR . $file))
				{
					self::_asd($directory, $file);
				}
			}
		}
		$dir->close();
	}
public static function register ( $ directory , $ first = true ) { if ( $ first ) { self :: $ scannedDirectories [ ] = $ directory ; } $ directory = trim ( $ directory , '/' ) ; $ dir = dir ( trim ( $ directory ) ) ; while ( false !== $ file = $ dir -> read ( ) ) { if ( $ file !== '.' && $ file !== '..' ) { if ( is_dir ( $ directory . DIRECTORY_SEPARATOR . $ file ) ) { self :: register ( $ directory . DIRECTORY_SEPARATOR . $ file , false ) ; } elseif ( is_file ( $ directory . DIRECTORY_SEPARATOR . $ file ) ) { self :: _asd ( $ directory , $ file ) ; } } } $ dir -> close ( ) ; }
Register the directory for the Autoloader.
Scan all files inside the directory recursively and buffer them in the classes property.

@param string $directory Absolute or relative path to directory that should scanned.
@param bool   $first
Register the directory for the Autoloader . Scan all files inside the directory recursively and buffer them in the classes property .