public function getOption($key) { if (!$this->hasOption($key)) { throw new InvalidException('Option ' . $key . ' does not exist'); } return $this->_options[$key]; }