public static function create(string $name, $value, int $expire = 1209600)
    {
        $cookieText = 'Set-Cookie: '.$name.'='.$value;
        
        $expireTime = new \DateTime;
        $expireTime->modify('+ '.$expire.' second');
        $cookieText .= '; Expires='.$expireTime->format('D, d M Y H:i:s e');
        
        $cookieText .= '; Path='.self::$path;
        $cookieText .= '; Domain='.self::$domain;
        
        if (self::$httpOnly === true) {
            $cookieText .= '; HttpOnly';
        }
        
        if (self::$secure === true) {
            $cookieText .= '; Secure';
        }
        
        if (!empty(self::$sameSite)) {
            $cookieText .= '; Samesite='.self::$sameSite;
        }
        
        header($cookieText);
    }