src/Net/Site/Crawler.php
protected function buildUrl( $parts )
	{
		$url	= new ADT_StringBuffer();
		if( isset( $parts['user'] ) && isset( $parts['pass'] ) && $parts['user'] )
			$url->append( $parts['user'].":".$parts['pass']."@" );
		if( substr( $parts['path'], 0, 1 ) != "/" )
			$parts['path']	= "/".$parts['path'];
		$host	= $parts['host'].( !empty( $parts['port'] ) ? ":".$parts['port'] : "" );
		$url->append( $host.$parts['path'] );
		if( isset( $parts['query'] ) )
			$url->append( "?".$parts['query'] );
		$url	= str_replace( "//", "/", $url->toString() );
		$url	= $parts['scheme']."://".$url;
		return $url;
	}
protected function buildUrl( $parts )
	{
		$url	= new ADT_StringBuffer();
		if( isset( $parts['user'] ) && isset( $parts['pass'] ) && $parts['user'] )
			$url->append( $parts['user'].":".$parts['pass']."@" );
		if( substr( $parts['path'], 0, 1 ) != "/" )
			$parts['path']	= "/".$parts['path'];
		$host	= $parts['host'].( !empty( $parts['port'] ) ? ":".$parts['port'] : "" );
		$url->append( $host.$parts['path'] );
		if( isset( $parts['query'] ) )
			$url->append( "?".$parts['query'] );
		$url	= str_replace( "//", "/", $url->toString() );
		$url	= $parts['scheme']."://".$url;
		return $url;
	}
protected function buildUrl ( $ parts ) { $ url = new ADT_StringBuffer ( ) ; if ( isset ( $ parts [ 'user' ] ) && isset ( $ parts [ 'pass' ] ) && $ parts [ 'user' ] ) $ url -> append ( $ parts [ 'user' ] . ":" . $ parts [ 'pass' ] . "@" ) ; if ( substr ( $ parts [ 'path' ] , 0 , 1 ) != "/" ) $ parts [ 'path' ] = "/" . $ parts [ 'path' ] ; $ host = $ parts [ 'host' ] . ( ! empty ( $ parts [ 'port' ] ) ? ":" . $ parts [ 'port' ] : "" ) ; $ url -> append ( $ host . $ parts [ 'path' ] ) ; if ( isset ( $ parts [ 'query' ] ) ) $ url -> append ( "?" . $ parts [ 'query' ] ) ; $ url = str_replace ( "//" , "/" , $ url -> toString ( ) ) ; $ url = $ parts [ 'scheme' ] . "://" . $ url ; return $ url ; }
Builds URL from Parts.
@access		protected
@param		array		$parts			Parts of URL
@return		string
Builds URL from Parts .