public function getOption($name)
    {
        if (is_string($name)) {
            if (isset($this->options[$name])) {
                return $this->options[$name];
            } else {
                throw new \InvalidArgumentException("An option with the name '$name' doesn't exist.");
            }
        } else {
            throw new \InvalidArgumentException("Invalid type '" . gettype($name) . "' for argument 'name'.");
        }
    }