public static function encode($string, $encodeSlashes = false)
	{
		if($encodeSlashes)
		{
			return rawurlencode($string);
		}
		
		return implode('/', array_map('rawurlencode', explode('/', (string)$string)));
	}
public static function encode($string, $encodeSlashes = false)
	{
		if($encodeSlashes)
		{
			return rawurlencode($string);
		}
		
		return implode('/', array_map('rawurlencode', explode('/', (string)$string)));
	}
public static function encode ( $ string , $ encodeSlashes = false ) { if ( $ encodeSlashes ) { return rawurlencode ( $ string ) ; } return implode ( '/' , array_map ( 'rawurlencode' , explode ( '/' , ( string ) $ string ) ) ) ; }
URL-encode the given string.

@param string $string
@param boolean $encodeSlashes Apply percent encoding to slashes?
@return string
URL - encode the given string .