src/UriBuilder.php
public function setParams(array $params)
	{
		$this->path = [];
		$this->query = [];
		
		foreach($params as $k => $v)
		{
			if(is_integer($k))
			{
				if(array_key_exists($k, $this->pathParamNames))
				{
					$this->path[$this->pathParamNames[$k]] = $v;
					
					continue;
				}
				
				throw new \OutOfBoundsException(sprintf('No path param at position %u', $k));
			}
			
			if(in_array($k, $this->pathParamNames, true))
			{
				$this->path[$k] = $v;
				
				continue;
			}
			
			$this->query[$k] = $v;
		}
		
		return $this;
	}
public function setParams(array $params)
	{
		$this->path = [];
		$this->query = [];
		
		foreach($params as $k => $v)
		{
			if(is_integer($k))
			{
				if(array_key_exists($k, $this->pathParamNames))
				{
					$this->path[$this->pathParamNames[$k]] = $v;
					
					continue;
				}
				
				throw new \OutOfBoundsException(sprintf('No path param at position %u', $k));
			}
			
			if(in_array($k, $this->pathParamNames, true))
			{
				$this->path[$k] = $v;
				
				continue;
			}
			
			$this->query[$k] = $v;
		}
		
		return $this;
	}
public function setParams ( array $ params ) { $ this -> path = [ ] ; $ this -> query = [ ] ; foreach ( $ params as $ k => $ v ) { if ( is_integer ( $ k ) ) { if ( array_key_exists ( $ k , $ this -> pathParamNames ) ) { $ this -> path [ $ this -> pathParamNames [ $ k ] ] = $ v ; continue ; } throw new \ OutOfBoundsException ( sprintf ( 'No path param at position %u' , $ k ) ) ; } if ( in_array ( $ k , $ this -> pathParamNames , true ) ) { $ this -> path [ $ k ] = $ v ; continue ; } $ this -> query [ $ k ] = $ v ; } return $ this ; }
Removes all param values from path and query and re-populates using the given values.

@param array<string, mixed> $params Path and query params to be set.
@return UriBuilder
Removes all param values from path and query and re - populates using the given values .