public function withPath(string $path): self
    {
        $newConstraints = $this->constraints;
        $newConstraints[self::CONSTRAINT_PATH] = $path;
        return new static($newConstraints);
    }
public function withPath(string $path): self
    {
        $newConstraints = $this->constraints;
        $newConstraints[self::CONSTRAINT_PATH] = $path;
        return new static($newConstraints);
    }
public function withPath ( string $ path ) : self { $ newConstraints = $ this -> constraints ; $ newConstraints [ self :: CONSTRAINT_PATH ] = $ path ; return new static ( $ newConstraints ) ; }
Create a new instance with the path constraint added

@param string $path The URI path to force, for example "some/path/"
@return UriConstraints
Create a new instance with the path constraint added