I think I understand what a factory class does, I'm just unsure when I'd use it. For example, I have this is my bootstrap:

PHP Code:
/**
 * Generic objects
 */                                   
$clean                 = new Helpers\Clean();
$page                 = new Helpers\Page();
$email                 = new Helpers\Email();
$date                 = new Helpers\Date();
$seconds             = new Helpers\Seconds();
$image                 = new Files\Image();


/**
 * Database connection
 */
if($settings['DEV']) {

    
$db = new Database\Connection($settings['DEV_DATABASE_HOST'],
                                  
$settings['DEV_DATABASE'],
                                  
$settings['DEV_DATABASE_USER'],
                                  
$settings['DEV_DATABASE_PASSWORD'],
                                  
$settings['DEV_DATABASE_CHARSET'],
                                  
$settings['DEV_DATABASE_LOG']);
                                           
}
else {

    
$db = new Database\Connection($settings['LIVE_DATABASE_HOST'],
                                  
$settings['LIVE_DATABASE'],
                                  
$settings['LIVE_DATABASE_USER'],
                                  
$settings['LIVE_DATABASE_PASSWORD'],
                                  
$settings['LIVE_DATABASE_CHARSET'],
                                  
$settings['LIVE_DATABASE_LOG']);

}


/**
 * Objects that require dependencies
 */
$generate             = new Helpers\Generate($clean);
$format             = new Helpers\Format($clean);
$validateServer        = new Helpers\ValidateServer($clean$date);
$validateClient        = new Helpers\ValidateClient($clean);
$generate            = new Helpers\Generate($clean);
$query                 = new Database\Query($db$clean);
$file                 = new Files\File($clean);
$upload                 = new Files\Upload($file$generate);
$search                = new Content\Search($db$clean); 
If I understand factory classes they create a bunch of objects. But why not just have code like the above?

Finally, I have just found out about ReflectionClass. Does this have any relevance to factory classes or is it just for debugging?

Thanks.