public function addCookie($name, $value, $expire = null, $path = null, $domain = null)
    {
        if (!is_null($expire)) {
            $expire = time() + $expire;
        }
        setcookie($name, $value, $expire, $path, $domain);
    }