protected function setCookie($cookieName, $cookieValue, $cookieTTL)
    {
        $cookieExpire = $this->currentTs + $cookieTTL;
        if (!headers_sent()) {
            setcookie(
                $this->getCookieName($cookieName),
                $cookieValue,
                $cookieExpire,
                $this->configCookiePath,
                $this->configCookieDomain
            );
        }
        return $this;
    }