Returns a named option.

@param string $name

@return mixed

@throws InvalidArgumentException
342647
public function getOption($name) {
    if (!array_key_exists($name, $this->options)) {
      throw new InvalidArgumentException(sprintf('Undefined option: "%s"', $name));
    }

    return $this->options[$name];
  }
103951
public function get($name)
    {
        switch ($name) {
            case '_':
                return $this->returnValue;

            case '_e':
                if (isset($this->lastException)) {
                    return $this->lastException;
                }
                break;

            case '__out':
                if (isset($this->lastStdout)) {
                    return $this->lastStdout;
                }
                break;

            case 'this':
                if (isset($this->boundObject)) {
                    return $this->boundObject;
                }
                break;

            case '__function':
            case '__method':
            case '__class':
            case '__namespace':
            case '__file':
            case '__line':
            case '__dir':
                if (\array_key_exists($name, $this->commandScopeVariables)) {
                    return $this->commandScopeVariables[$name];
                }
                break;

            default:
                if (\array_key_exists($name, $this->scopeVariables)) {
                    return $this->scopeVariables[$name];
                }
                break;
        }

        throw new \InvalidArgumentException('Unknown variable: $' . $name);
    }
60054
public function getRequiredArg(string $name)
    {
        if ('' !== $this->get($name, '')) {
            return $this->args[$name];
        }

        throw new \InvalidArgumentException(sprintf('The argument %s is required', $name));
    }
862861
public function get($name)
    {
        if (!isset($this->profiles[$name])) {
            throw new \InvalidArgumentException(sprintf('Profile "%s" is not registered.', $name));
        }

        return $this->profiles[$name];
    }
1025309
public function getOption($name = '')
    {
        if ('' === $name) {
            return $this->option;
        }

        return isset($this->option[$name]) ? $this->option[$name] : null;
    }
379957
public function option(string $name)
    {
        if (!array_key_exists($name, $this->options))
            throw new \InvalidArgumentException("Unknown option '{$name}'");
        return $this->options[$name];
    }
489407
public function getGetParameter($name)
    {
        if (!$this->hasGetParameter($name)) {
            throw new \InvalidArgumentException(sprintf('The GET request parameter "%s" does not exist.', $name));
        }

        return $this->getParameters[rawurlencode($name)];
    }
895321
public function option($name)
    {
        $input = $this->getInput();

        return (is_null($name)) ? $input->getOptions() : $input->getOption($name);
    }
610554
public function getNamer($name)
    {
        if (!isset($this->namers[$name])) {
            throw new \InvalidArgumentException(sprintf('Namer "%s" is not registered.', $name));
        }

        return $this->namers[$name];
    }
519198
public function getOption($name)
    {
        if (isset($this->options[$name])) {
            return $this->options[$name];
        }
        return false;
    }
285964
public function getCallable($name)
     {
         if (method_exists($this, $name)) {
             return call_user_func([$this, $name]);
         } else {
             throw new InvalidArgumentException('Undefined property: '.get_class($this)."::$name");
         }
     }
674472
public function getParameter($name)
    {
        $config = $this->get('config');
        if (!isset($config['parameters'][$name])) {
            throw new \InvalidArgumentException(sprintf('You have requested a non-existent parameter "%s".', $name));
        }

        return $config['parameters'][$name];
    }
699374
public function getOption($name)
    {
        $method = 'get' . ucfirst($name);
        if (method_exists($this, $method) && $method !== __FUNCTION__) {
            return $this->$method();
        } elseif (isset($this->options[$name])) {
            return $this->options[$name];
        }
    }
614440
public function getOption($name) {
		if (array_key_exists($name, $this->configuration)) {
			return $this->configuration[$name];
		}
		
		return null;
	}
143977
public function getProvider($name)
    {
        if (!isset($this->providers[$name])) {
            throw new \InvalidArgumentException(sprintf(
                'Unknown provider "%s", registered reindex providers: "%s"',
                $name, implode('", "', array_keys($this->providers))
            ));
        }

        return $this->providers[$name];
    }
513609
public function getClient(string $name = 'default')
    {
        if (!isset($this->clients[$name])) {
            throw new InvalidArgumentException("No client with name \"$name\"");
        }

        return $this->clients[$name];
    }
1057942
public function get($name, array $options = [])
    {
        if (null === $menu = $this->findByName($name)) {
            throw new \InvalidArgumentException(sprintf('The menu "%s" is not defined.', $name));
        }

        return $this->buildItem($menu, array_merge([
            'attributes' => ['id' => $menu['name'] . '-nav'] // Root css id
        ], $options));
    }