public function setCookie(
        string $scope,
        string $name,
        string $value = "",
        int $expire = 0,
        string $path = "",
        string $domain = "",
        bool $secure = false,
        bool $httponly = false
    ): bool {
        if ($this->canSet($scope)) {
            return setcookie($name, $value, $expire, $path, $domain, $secure, $httponly);
        }

        if (isset($_COOKIE[$name])) {
            return setcookie($name, "", time() - 360, $path, $domain, $secure, $httponly);
        }

        return false;
    }