public function setOptions(array $options, $merge = true)
    {
        if ($merge) {
            $this->options = array_replace($this->options, $options);
        } else {
            $this->options = $options;
        }
    }