public static function addFile($file, $type = '')
    {
        
		if(empty($type)){
			if(preg_match("/\.".tao_helpers_Scriptloader::CSS."$/", $file)){
				$type = tao_helpers_Scriptloader::CSS;
			}
			if(preg_match("/\.".tao_helpers_Scriptloader::JS."$/", $file)){
				$type = tao_helpers_Scriptloader::JS;
			}
		}
		switch(strtolower($type)){
			case tao_helpers_Scriptloader::CSS: self::$cssFiles[] = $file; break;
			case tao_helpers_Scriptloader::JS:  self::$jsFiles[]  = $file; break;
			default:
				throw new Exception("Unknown script type for file : ".$file);
		} 
        
    }
public static function addFile($file, $type = '')
    {
        
		if(empty($type)){
			if(preg_match("/\.".tao_helpers_Scriptloader::CSS."$/", $file)){
				$type = tao_helpers_Scriptloader::CSS;
			}
			if(preg_match("/\.".tao_helpers_Scriptloader::JS."$/", $file)){
				$type = tao_helpers_Scriptloader::JS;
			}
		}
		switch(strtolower($type)){
			case tao_helpers_Scriptloader::CSS: self::$cssFiles[] = $file; break;
			case tao_helpers_Scriptloader::JS:  self::$jsFiles[]  = $file; break;
			default:
				throw new Exception("Unknown script type for file : ".$file);
		} 
        
    }
public static function addFile ( $ file , $ type = '' ) { if ( empty ( $ type ) ) { if ( preg_match ( "/\." . tao_helpers_Scriptloader :: CSS . "$/" , $ file ) ) { $ type = tao_helpers_Scriptloader :: CSS ; } if ( preg_match ( "/\." . tao_helpers_Scriptloader :: JS . "$/" , $ file ) ) { $ type = tao_helpers_Scriptloader :: JS ; } } switch ( strtolower ( $ type ) ) { case tao_helpers_Scriptloader :: CSS : self :: $ cssFiles [ ] = $ file ; break ; case tao_helpers_Scriptloader :: JS : self :: $ jsFiles [ ] = $ file ; break ; default : throw new Exception ( "Unknown script type for file : " . $ file ) ; } }
add a file to load

@access public
@author Bertrand Chevrier, <bertrand.chevrier@tudor.lu>
@param  string file
@param  string type
@return mixed
@throws Exception
add a file to load