options[$key]); } /** * {@inheritdoc} */ public function getOption($key) { return $this->options[$key] ?? null; } /** * {@inheritdoc} */ public function getOptions(array $key) { $options = []; foreach ($key as $value) { if (isset($this->options[$value])) { $options[$value] = $this->options[$value]; } } return $options; } /** * {@inheritdoc} */ public function setOption($key, $value, bool $overwrite = true) : bool { if ($overwrite || !isset($this->options[$key])) { $this->options[$key] = $value; return true; } return false; } /** * {@inheritdoc} */ public function setOptions(array $pair, bool $overwrite = true) : bool { if ($overwrite) { $this->options = $pair + $this->options; } else { $this->options += $pair; } return true; } }