public function addOptions($options) { if (!is_array($options)) { throw new InvalidParamException('Array parameter expected, ' . gettype($options) . ' received.'); } $this->options = array_merge($this->options, $options); return $this; }