src/UriBuilder.php
public function param($name, $value)
	{
		if(is_integer($name))
		{
			if(array_key_exists($name, $this->pathParamNames))
			{
				$this->path[$this->pathParamNames[$name]] = $value;
				
				return $this;
			}
			
			throw new \OutOfBoundsException(sprintf('No path param at position %u', $name));
		}
		
		if(in_array($name, $this->pathParamNames, true))
		{
			$this->path[(string)$name] = $value;
			
			return $this;
		}
		
		$this->query[(string)$name] = $value;
		
		return $this;
	}
public function param($name, $value)
	{
		if(is_integer($name))
		{
			if(array_key_exists($name, $this->pathParamNames))
			{
				$this->path[$this->pathParamNames[$name]] = $value;
				
				return $this;
			}
			
			throw new \OutOfBoundsException(sprintf('No path param at position %u', $name));
		}
		
		if(in_array($name, $this->pathParamNames, true))
		{
			$this->path[(string)$name] = $value;
			
			return $this;
		}
		
		$this->query[(string)$name] = $value;
		
		return $this;
	}
public function param ( $ name , $ value ) { if ( is_integer ( $ name ) ) { if ( array_key_exists ( $ name , $ this -> pathParamNames ) ) { $ this -> path [ $ this -> pathParamNames [ $ name ] ] = $ value ; return $ this ; } throw new \ OutOfBoundsException ( sprintf ( 'No path param at position %u' , $ name ) ) ; } if ( in_array ( $ name , $ this -> pathParamNames , true ) ) { $ this -> path [ ( string ) $ name ] = $ value ; return $ this ; } $ this -> query [ ( string ) $ name ] = $ value ; return $ this ; }
Assign a value to a path or query param depending on the URI pattern checking
the name of the param.

@param string $name
@param string $value
@return UriBuilder
Assign a value to a path or query param depending on the URI pattern checking the name of the param .