获取必须选项

@param string $name
@return mixed|null
@throws \InvalidArgumentException
558883
public function getRequiredOpt(string $name)
    {
        $val = $this->getOpt($name);
        if ($val === null) {
            throw new \InvalidArgumentException(sprintf('The option %s is required)', $name));
        }

        return $val;
    }
1252110
public function get($name)
    {
        $lowerName = strtolower($name);
        if (isset($this->properties[$lowerName])) {
            return $this->properties[$lowerName];
        }
        throw new \InvalidArgumentException(
            "Undefined property: $name (Node ID: ".$this->properties['id'].')'
        );
    }
1310021
public function getParam($name) {
        if (empty($name) || !is_string($name)) {
            throw new \InvalidArgumentException('Paramater name must be not empty string');
        }

        if (isset($this->params[$name]) || array_key_exists($name, $this->params)) {
            return $this->params[$name];
        }
        throw new ConfigurationException(sprintf('Parameter %s doesn\'t exists', $name));
    }
1193560
public function get(string $name = null): \TheCMSThread\Classes\Plugin
    {
        if (empty($name) === false && empty($this->plugins[$name]) === false) {
            return $this->plugins[$name];
        } else {
            throw new \InvalidArgumentException("Plugin not found");
        }
    }
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)];
    }
112590
public function getOption($name) {
        if (!$this->definition->hasOption($name)) {
            throw new \InvalidArgumentException(sprintf('The "%s" option does not exist.', $name));
        }

        return isset($this->options[$name]) ? $this->options[$name] : $this->definition->getOption($name)->getDefault();
    }
190983
public function getOption(string $name)
    {
        if (!$this->options->offsetExists($name)) {
            throw new Exception\InvalidArgumentException("Option '$name' does not exists'");
        }

        return $this->options[$name];
    }
58289
public function getParameter($name)
    {
        $key = strtolower($name);

        if (isset($this->parameters[$key])) {
            return $this->parameters[$key];
        }

        return null;
    }
684977
public function parameter(string $name): ?string
    {
        if (isset($this->parameters[$name])) {
            return $this->parameters[$name];
        }

        return null;
    }
711516
public function get($name)
    {
        /** @var LoaderInterface $loader */
        foreach ($this->loaders as $loader) {
            try {
                return $loader->get($name);
            } catch (\Exception $e) {
            }
        }

        throw new InvalidArgumentException("View [$name] not found in any registered loader.");
    }
424684
public static function getNameValue($name)
    {
        static::initialize();

        if (!static::isValidName($name)) {
            throw new \InvalidArgumentException(sprintf(
                'The enum name "%s" is not valid. Expected one of: %s',
                $name,
                implode(', ', static::names())
            ));
        }

        return static::$constants[static::$lcKeyMap[strtolower($name)]];
    }
680374
public function get($name)
    {
        if (!isset($this->assets[$name])) {
            throw new \InvalidArgumentException(sprintf('There is no "%s" asset.', $name));
        }

        return $this->assets[$name];
    }
740412
public function get($name)
    {
        if (!array_key_exists($name, $this->queues)) {
            throw new \InvalidArgumentException("The queue does not exist. {$name}");
        }

        return $this->queues[$name];
    }
1216834
public function get($name)
    {
        if ($this->argument->defined($name)) {
            return $this->argument->get($name);
        }
        return null;
    }
937621
public function getConnection($name = null)
    {
        if (null === $name) {
            $name = $this->defaultConnection;
        }

        if (!isset($this->connections[$name])) {
            throw new \InvalidArgumentException(sprintf('AMQP Connection named "%s" does not exist.', $name));
        }

        return $this->connections[$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);
    }
273839
public function find($name)
    {
        if ($this->is_registered($name)) {
            return $this->items[$name];
        }
        $model = $this->adaptor->getModel($name);
        if ($model) {
            return $model;
        }
        throw new \InvalidArgumentException("{$name} not registered");
    }