public function withValue(string $value): self
    {
        $cookie = clone $this;
        $cookie->value = $value;

        return $cookie;
    }
public function withValue(string $value): self
    {
        $cookie = clone $this;
        $cookie->value = $value;

        return $cookie;
    }
public function withValue ( string $ value ) : self { $ cookie = clone $ this ; $ cookie -> value = $ value ; return $ cookie ; }
Get new cookie with altered value. Original cookie object should not be changed.

@param string $value

@return Cookie
Get new cookie with altered value . Original cookie object should not be changed .