public static function setOptions(array $options, $update = true)
    {
        if ($update) {
            $config = self::getInstance();
            $config->applyOptions($options);
            $config->validateOptions();
        } else {
            self::$instance = new self($options);
        }
    }