Gets the client with the input name

@param string $name The name of the client to get
@return mixed The client
@throws InvalidArgumentException Thrown if no client with the input name exists
513609
public function getClient(string $name = 'default')
    {
        if (!isset($this->clients[$name])) {
            throw new InvalidArgumentException("No client with name \"$name\"");
        }

        return $this->clients[$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();
    }
583498
public static function get($name)
    {
        $name = strtolower($name);

        if (!isset(self::$instantiated[$name])) {
            throw new InvalidArgumentException(sprintf('Broadcaster "%s" is not instantiated.', $name));
        }

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

    return $this->options[$name];
  }
1103158
public function getArgument($name) {
        if (!$this->definition->hasArgument($name)) {
            throw new \InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name));
        }

        return isset($this->arguments[$name]) ? $this->arguments[$name] : $this->definition->getArgument($name)
            ->getDefault();
    }
345046
public function get($name)
    {
        if ($this->cache->has($name)) {
            return $this->loader->load($this->cache->get($name));
        }

        if (!$this->cache->isFresh()) {
            $this->refresh();

            return $this->get($name);
        }

        throw new \InvalidArgumentException(sprintf(
            'Unknown resource named "%s" for the host "%s"',
            $name,
            $this->host
        ));
    }
1012208
public function get($name)
    {
        if (!$this->has($name)) {
            throw new \InvalidArgumentException(sprintf('The field guesser "%s" does not exist.', $name));
        }

        return $this->fieldGuessers[$name];
    }
1252224
public function get($name)
    {
        $input = null;
        if ($this->has($name)) {
            $input = $this->_inputs[$name];
        }
        return $input;
    }
1057523
public function getOption($name) {
        if(!isset($this->options[$name])){
            throw new InvalidArgumentException(sprintf("The option name '%s' is invalid, available are %s.",$name, implode(",",array_keys($this->options))));
        }
        return $this->options[$name];
    }
409804
public function getProject($name)
    {
        if ( ! $this->hasProject($name) )
        {
            throw new \InvalidArgumentException("Project [$name] could not be found in [{$this->rootDir}]");
        }

        return $this->projects->get($name);
    }
1000099
public static function lookupByName($name)
    {
        if (empty($name)) {
            throw new \InvalidArgumentException('Argument "name" cannot be empty');
        }

        if (!isset(self::$methods_config[$name])) {
            throw new \InvalidArgumentException('Method "' . $name . '" doesn\'t exist');
        }

        return self::$methods_config[$name];
    }
429360
public function find(string $name)
    {
        if (! \array_key_exists($name, $this->keyMap)) {
            throw new InvalidArgumentException("Name [{$name}] is not available.");
        }

        return $this->controls[$this->keyMap[$name]];
    }
525522
public function getParameter($name)
    {
        if (!array_key_exists($name, $this->config)) {
            throw new \InvalidArgumentException(sprintf(
                'Parameter "%s" has not been registered',
                $name
            ));
        }

        return $this->config[$name];
    }
303264
public function createHttpClient($name = '', $client = null)
    {
        if (empty($name)) {
            return $this->createBestClient();
        }

        if (!isset($this->classes[$name])) {
            throw new \InvalidArgumentException(sprintf('The client "%s" is not registered.', $name));
        }

        $class = $this->classes[$name]['class'];
        $client = new $class($this->dispatcher, $this->options, $client);

        if ($client instanceof AbstractHttpClient) {
            return $client;
        }

        throw new \InvalidArgumentException('The client must be an implementation of ClientInterface.');
    }
1071376
public function get($name)
    {
        if (!isset($this->helpers[$name])) {
            throw new \InvalidArgumentException(sprintf('The helper "%s" is not defined.', $name));
        }

        return $this->helpers[$name];
    }
556711
public function get($name)
    {
        if (!isset($this->collectors[$name])) {
            throw new \InvalidArgumentException(\sprintf('Collector "%s" does not exist.', $name));
        }

        return $this->collectors[$name];
    }
541229
public function get($name)
    {
        if (! isset($this->routes[$name])) {
            throw new InvalidArgumentException(
                sprintf('The route with given name "%s" not exists.', $name)
            );
        }

        return $this->routes[$name];
    }