public static function setPaths($paths, $recursive = false, $filter = '')
    {
        
		foreach($paths as $path){
    		if(!preg_match("/\/$/", $path)){
    			$path .= '/';
    		}
			if(empty($filter) || strtolower($filter) == tao_helpers_Scriptloader::CSS){
				foreach(glob($path . "*." . tao_helpers_Scriptloader::CSS) as $cssFile){
					self::$cssFiles[] = $path . $cssFile;
				}
			}
			if(empty($filter) || strtolower($filter) == tao_helpers_Scriptloader::JS){
				foreach(glob($path . "*." . tao_helpers_Scriptloader::JS) as $jsFile){
					self::$jsFiles[] = $path . $jsFile;
				}
			}
			if($recursive){
				$dirs = array();
				foreach(scandir($path) as $file){
					if(is_dir($path.$file) && $file != '.' && $file != '..'){
						$dirs[] = $path.$file;
					}
				}
				if(count($dirs) > 0){
					self::setPaths($dirs, true, $filter);
				}
			}
    	}
        
    }
public static function setPaths($paths, $recursive = false, $filter = '')
    {
        
		foreach($paths as $path){
    		if(!preg_match("/\/$/", $path)){
    			$path .= '/';
    		}
			if(empty($filter) || strtolower($filter) == tao_helpers_Scriptloader::CSS){
				foreach(glob($path . "*." . tao_helpers_Scriptloader::CSS) as $cssFile){
					self::$cssFiles[] = $path . $cssFile;
				}
			}
			if(empty($filter) || strtolower($filter) == tao_helpers_Scriptloader::JS){
				foreach(glob($path . "*." . tao_helpers_Scriptloader::JS) as $jsFile){
					self::$jsFiles[] = $path . $jsFile;
				}
			}
			if($recursive){
				$dirs = array();
				foreach(scandir($path) as $file){
					if(is_dir($path.$file) && $file != '.' && $file != '..'){
						$dirs[] = $path.$file;
					}
				}
				if(count($dirs) > 0){
					self::setPaths($dirs, true, $filter);
				}
			}
    	}
        
    }
public static function setPaths ( $ paths , $ recursive = false , $ filter = '' ) { foreach ( $ paths as $ path ) { if ( ! preg_match ( "/\/$/" , $ path ) ) { $ path .= '/' ; } if ( empty ( $ filter ) || strtolower ( $ filter ) == tao_helpers_Scriptloader :: CSS ) { foreach ( glob ( $ path . "*." . tao_helpers_Scriptloader :: CSS ) as $ cssFile ) { self :: $ cssFiles [ ] = $ path . $ cssFile ; } } if ( empty ( $ filter ) || strtolower ( $ filter ) == tao_helpers_Scriptloader :: JS ) { foreach ( glob ( $ path . "*." . tao_helpers_Scriptloader :: JS ) as $ jsFile ) { self :: $ jsFiles [ ] = $ path . $ jsFile ; } } if ( $ recursive ) { $ dirs = array ( ) ; foreach ( scandir ( $ path ) as $ file ) { if ( is_dir ( $ path . $ file ) && $ file != '.' && $ file != '..' ) { $ dirs [ ] = $ path . $ file ; } } if ( count ( $ dirs ) > 0 ) { self :: setPaths ( $ dirs , true , $ filter ) ; } } } }
define the paths to look for the scripts

@access public
@author Bertrand Chevrier, <bertrand.chevrier@tudor.lu>
@param  array paths
@param  boolean recursive
@param  string filter
@return mixed
define the paths to look for the scripts