public function withAddedValue($path, $value)
    {
        $new = clone $this;
        if ($new->isExpanded === false) {
            $new->value = $new->_expand($new->value);
        }
        $new->value = Hash::insert($new->value, $path, $value);

        return $new;
    }
public function withAddedValue($path, $value)
    {
        $new = clone $this;
        if ($new->isExpanded === false) {
            $new->value = $new->_expand($new->value);
        }
        $new->value = Hash::insert($new->value, $path, $value);

        return $new;
    }
public function withAddedValue ( $ path , $ value ) { $ new = clone $ this ; if ( $ new -> isExpanded === false ) { $ new -> value = $ new -> _expand ( $ new -> value ) ; } $ new -> value = Hash :: insert ( $ new -> value , $ path , $ value ) ; return $ new ; }
Create a new cookie with updated data.

@param string $path Path to write to
@param mixed $value Value to write
@return static
Create a new cookie with updated data .