public function getOption($name) { if (!array_key_exists($name, $this->options)) { throw new \InvalidArgumentException("{$name} is not a valid option name.", 2); } return $this->options[$name]; }