src/UriBuilder.php
public function pathParam($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('Path param %u not found in pattern "%s"', $name, $this->uri));
		}
		
		if(in_array($name, $this->pathParamNames, true))
		{
			$this->path[(string)$name] = $value;
			
			return $this;
		}
		
		throw new \OutOfBoundsException(sprintf('Path param "%s" not found in pattern "%s"', $name, $this->uri));
	}
public function pathParam($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('Path param %u not found in pattern "%s"', $name, $this->uri));
		}
		
		if(in_array($name, $this->pathParamNames, true))
		{
			$this->path[(string)$name] = $value;
			
			return $this;
		}
		
		throw new \OutOfBoundsException(sprintf('Path param "%s" not found in pattern "%s"', $name, $this->uri));
	}
public function pathParam ( $ 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 ( 'Path param %u not found in pattern "%s"' , $ name , $ this -> uri ) ) ; } if ( in_array ( $ name , $ this -> pathParamNames , true ) ) { $ this -> path [ ( string ) $ name ] = $ value ; return $ this ; } throw new \ OutOfBoundsException ( sprintf ( 'Path param "%s" not found in pattern "%s"' , $ name , $ this -> uri ) ) ; }
Assign a value to a path param.

@param string $name
@param string $value
@return UriBuilder

@throws \OutOfBoundsException When no such param (name or index) exists.
Assign a value to a path param .