static public function setCookie($name, $value, $expire='3600', $path=null, $domain=null, $secure=null, $httponly=null)
    {
        $expire = $expire ? time() + (is_numeric($expire) ? intval($expire) : intval(self::$COOKIE_EXPIRE)) : 0;
        if (empty($path))   $path = '/';
        if (empty($domain)) $domain = self::$COOKIE_DOMAIN ? self::$COOKIE_DOMAIN : UriHelper::GetRootDomain();
        $secure   = is_null($secure) ? static::$COOKIE_SECURE : (bool) $secure;
        $httponly = is_null($httponly) ? static::$COOKIE_HTTP_ONLY : (bool) $httponly;
        
        $name = static::$COOKIE_PREFIX . $name;
        $result = setcookie($name, $value, $expire, $path, $domain, $secure, $httponly);
        $_COOKIE[$name] = $value; 
    }