src/Leevel/Http/Cookie.php
public function arr(string $key, $keys, $value = null, array $option = []): void
    {
        $arr = $this->get($key, [], $option);

        if (is_string($keys)) {
            $arr[$keys] = $value;
        } elseif (is_array($keys)) {
            $arr = array_merge($arr, $keys);
        }

        $this->set($key, $arr, $option);
    }
public function arr(string $key, $keys, $value = null, array $option = []): void
    {
        $arr = $this->get($key, [], $option);

        if (is_string($keys)) {
            $arr[$keys] = $value;
        } elseif (is_array($keys)) {
            $arr = array_merge($arr, $keys);
        }

        $this->set($key, $arr, $option);
    }
数组插入键值对数据.

@param string $key
@param mixed  $keys
@param mixed  $value
@param array  $option