src/Http.php
public function cookie($key, $value = null) {
        if (strpos($key, '@') === 0
            && is_file(substr($key, 1))) {
            return $this->setCookieFile(substr($key, 1));
        }
        if (is_array($key)
            || strpos($key, '=') !== false) {
            return $this->setCookie($key);
        }
        return $this->setCookie([
            $key => $value
        ]);
    }
public function cookie($key, $value = null) {
        if (strpos($key, '@') === 0
            && is_file(substr($key, 1))) {
            return $this->setCookieFile(substr($key, 1));
        }
        if (is_array($key)
            || strpos($key, '=') !== false) {
            return $this->setCookie($key);
        }
        return $this->setCookie([
            $key => $value
        ]);
    }
设置cookie
@param $key
@param null $value
@return Http