core/Request.php
public static function setCookie(string $name, $value, $options)
    {
        if ($options == null) {
            return setcookie($name, $value);
        }
        if (is_integer($options)) {
            return setcookie($name, $value, $options);
        }
        $expire = isset($options['expire']) ? intval($options['expire']) : 0;
        $path = isset($options['path']) ? intval($options['path']) : '';
        $domain = isset($options['domain']) ? intval($options['domain']) : '';
        $secure = isset($options['secure']) ? intval($options['secure']) : false;
        $httponly = isset($options['httponly ']) ? intval($options['httponly ']) : false;
        return setcookie($name, $value, $expire, $path, $domain, $secure, $httponly);
    }
public static function setCookie(string $name, $value, $options)
    {
        if ($options == null) {
            return setcookie($name, $value);
        }
        if (is_integer($options)) {
            return setcookie($name, $value, $options);
        }
        $expire = isset($options['expire']) ? intval($options['expire']) : 0;
        $path = isset($options['path']) ? intval($options['path']) : '';
        $domain = isset($options['domain']) ? intval($options['domain']) : '';
        $secure = isset($options['secure']) ? intval($options['secure']) : false;
        $httponly = isset($options['httponly ']) ? intval($options['httponly ']) : false;
        return setcookie($name, $value, $expire, $path, $domain, $secure, $httponly);
    }
设置cookie
@param string $name
@param $value
@param $options
@return bool