public function setOptions($options)
    {
        if (is_array($options)) {
            $this->options = $options;

            return $this;
        }
        $this->options = json_decode($options, true);
        if (null === $this->options) {
            $this->options = $options;
        }

        return $this;
    }