public function setOptions(array $options) { if (!$this->validateOptions($options)) { throw new \UnexpectedValueException('Options consists not allowed keys'); } $this->options = array_merge($this->defaultOptions, $options); return $this; }