private function formatUrl() {

		$jar 	= [];
		$query 	= $this -> url -> getQuery();

		if(null !== $query) {
			$jar[] = $query;
		}
		
		$query 	= '';

		if(count($this -> params) > 0 || count($jar) > 0) {

			if($this -> method === 'get') {
				
				foreach($this -> params as  $param) {

					$key  	= $param -> encode ? urlencode($param -> key) : $param -> key;
					$value 	= $param -> encode ? urlencode($param -> value) : $param -> value;

					$jar[] = sprintf('%s=%s', $key, $value);
				}
			}

			$query = '?' . implode('&', $jar);
		}

		return $this -> url -> generate(URLParser :: UNTIL_PATH) . $query;
	}
private function formatUrl() {

		$jar 	= [];
		$query 	= $this -> url -> getQuery();

		if(null !== $query) {
			$jar[] = $query;
		}
		
		$query 	= '';

		if(count($this -> params) > 0 || count($jar) > 0) {

			if($this -> method === 'get') {
				
				foreach($this -> params as  $param) {

					$key  	= $param -> encode ? urlencode($param -> key) : $param -> key;
					$value 	= $param -> encode ? urlencode($param -> value) : $param -> value;

					$jar[] = sprintf('%s=%s', $key, $value);
				}
			}

			$query = '?' . implode('&', $jar);
		}

		return $this -> url -> generate(URLParser :: UNTIL_PATH) . $query;
	}
private function formatUrl ( ) { $ jar = [ ] ; $ query = $ this -> url -> getQuery ( ) ; if ( null !== $ query ) { $ jar [ ] = $ query ; } $ query = '' ; if ( count ( $ this -> params ) > 0 || count ( $ jar ) > 0 ) { if ( $ this -> method === 'get' ) { foreach ( $ this -> params as $ param ) { $ key = $ param -> encode ? urlencode ( $ param -> key ) : $ param -> key ; $ value = $ param -> encode ? urlencode ( $ param -> value ) : $ param -> value ; $ jar [ ] = sprintf ( '%s=%s' , $ key , $ value ) ; } } $ query = '?' . implode ( '&' , $ jar ) ; } return $ this -> url -> generate ( URLParser :: UNTIL_PATH ) . $ query ; }
Adds new params to existing params to format the url
@return string
Adds new params to existing params to format the url