Get the configuration array for a job.

@param string $name The name of the job.

@return Definition

@throws \InvalidArgumentException When the job does not exist.
335895
public function getJob(string $name): Definition
    {
        if (!$this->hasJob($name)) {
            throw new \InvalidArgumentException('Job not found: ' . $name);
        }

        return $this->jobs[$name];
    }
483904
public static function get($name)
    {
        if (!isset(static::$idGenerators[$name])) {
            if (!static::has($name)) {
                throw new \InvalidArgumentException(sprintf('The id generator "%s" does not exists.', $name));
            }

            static::$idGenerators[$name] = new static::$map[$name];
        }

        return static::$idGenerators[$name];
    }
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];
    }
1166910
public function getConnectionConfig($name)
    {
        $name = $name ?: $this->default;

        if (!is_array($config = Arr::get($this->config, $name)) && !$config) {
            throw new InvalidArgumentException("Connection [$name] not configured.");
        }

        return $config;
    }
1042639
public function getAction($name) {
        if(isset($this->actions[$name])) {
            return $this->actions[$name];
        } else {
            throw new InvalidArgumentException('Action does not exist: ' . $name);
        }
    }
586213
public function getParameter($name)
    {
        if (!array_key_exists($name, $this->parameters)) {
            throw new InvalidArgumentException(sprintf('Parameter: "%s" does not exist', $name));
        }

        return $this->parameters[$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]];
    }
785613
public function getBotConfig($name = null)
    {
        $name = $name ?: $this->getDefaultBot();

        $bots = $this->getConfig('bots');
        if (!is_array($config = array_get($bots, $name)) && !$config) {
            throw new InvalidArgumentException("Bot [$name] not configured.");
        }

        $config['bot'] = $name;

        return $config;
    }
1340216
public function getConnection($name)
    {
        if (!$this->connectionSettings->has($name)) {
            throw new BadArgumentException('Connection with name ":name" not defined in configuration file ":file"', [
                'name' => $name, 'file' => ServiceLocator::instance()->getConfiguration()->getIdentity(),
            ]);
        }
        
        if (!static::$connections->has($name)) {
            static::$connections->set($name, new Connection($this->connectionSettings->get($name)));
        }
        
        return static::$connections[$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();
    }
617004
public function getRole($name)
    {
        if ($this->hasRole($name)) {
            return $this->roles[$name];
        }

        throw new \InvalidArgumentException(sprintf('No role with name "%s" could be found', $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];
    }
939304
public function getDefinitionByName($name)
    {
        if (!array_key_exists($name, $this->definitions)) {
            throw new \InvalidArgumentException(sprintf('Can\'t find "%s" Definition.', $name));
        }

        return $this->definitions[$name];
    }
1295429
public function get($name)
    {
        if (!isset($this->adapters[$name])) {
            throw new \InvalidArgumentException(sprintf('No Adapter with name "%s" is registered.', $name));
        }

        return $this->adapters[$name];
    }
1273059
public function get ($name)
    {
        if (!isset($this->dataGridIds[$name])) {
            throw new \InvalidArgumentException(sprintf('The datagrid "%s" is not defined.', $name));
        }
        
        return $this->container->get($this->dataGridIds[$name]);
    }
1170096
public function getChild($name)
    {
        if (!isset($this->children[$name])) {
            throw new \InvalidArgumentException(sprintf(
                'Unknown child "%s" in structure "%s" loaded from: "%s". Children: "%s"',
                 $name, $this->name, $this->resource, implode('", "', array_keys($this->children))
            ));
        }

        return $this->children[$name];
    }
428332
protected function getOrMake(string $name) : JobInterface
    {
        $value = $this->jobs[$name];

        if ($value instanceof JobInterface) {
            return $value;
        }

        if (is_string($value)) {
            $reflectionClass = new ReflectionClass($value);

            $job = $reflectionClass->newInstance(); // Create instance
        } else {
            /** @var Closure $value */
            $job = $value(); // Execute closure
        }

        if (! $job instanceof JobInterface) {
            throw new JobException("Object '$name' is not a job!");
        }

        $this->jobs[$name] = $job;

        return $job;
    }