Get twig extension
@throws InvalidConfigException
@param string $name extension name
@return mixed extension instance
547772
private function getExtension($name)
	{
		if (class_exists('Twig_Extensions_Extension_' . $name)) {
			$name = 'Twig_Extensions_Extension_' . $name;
		}
		elseif (class_exists('Twig_Extensions_Extension_' . ucfirst(strtolower($name)))) {
			$name = 'Twig_Extensions_Extension_' . ucfirst(strtolower($name));
		}
		elseif (!class_exists($name)) {
			throw new InvalidConfigException('Twig extension "' . $name . '" not declared.');
		}
		return new $name();
	}
393831
public function getConfig($name)
    {
        if (is_array($name)) {
            $config = $name;
            $name = uniqid();
            $this->setConfig($name, $config);
        }

        $name = trim($name);
        $name = $this->processRawCliConfig($name);

        if (!isset($this->configs[$name])) {
            throw new \InvalidArgumentException(sprintf(
                'No %s configuration named "%s" exists. Known configurations: "%s"',
                $this->serviceType,
                $name,
                implode('", "', array_keys($this->configs))
            ));
        }

        if (!isset($this->resolvedConfigs[$name])) {
            $this->resolveConfig($name);
        }

        return $this->resolvedConfigs[$name];
    }
1170768
public function getExtra($name)
    {
        if ($this->hasExtra($name)) {
            return $this->extras[$name];
        }

        throw new \InvalidArgumentException(sprintf('Extra with name "%s" is not defined', $name));
    }
1102296
final public static function get($name)
    {
        return isset(self::$allLoadedConfigs[$name])
            ? self::$allLoadedConfigs[$name]
            : self::$allLoadedConfigs[$name] = Arr::overwrite(static::load($name), LocalConfig::load($name));
    }
1187118
public function getAjaxConfig($name = null)
    {
        if (!is_null($name)) {
            return isset($this->ajaxConfig[$name]) ? $this->ajaxConfig[$name] : null;
        }
        
        return $this->ajaxConfig;
    }
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];
    }
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];
    }
881829
protected function loader($name)
    {
        if (false !== \strpos('.', $name)) {
            throw new Exceptions\Invalid($name);
        }

        if (isset($this->loaders[$name])) {
            return $this->loaders[$name];
        }

        foreach ($this->extensions as $extension) {
            try {
                $path = $this->buildPath($name, $extension);
                $this->loaders[$name] = FileLoader::load($path);

                return $this->loaders[$name];
            } catch (NotFound\Path $argumentException) {
                continue;
            }
        }

        throw new NotFound\Path($this->root . $name);
    }
934309
public static function get($name)
    {
        if (!isset(static::$types[$name])) {
            if (!static::has($name)) {
                throw new \InvalidArgumentException(sprintf('The type "%s" does not exists.', $name));
            }

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

        return static::$types[$name];
    }
1222607
public function getConfigurator(string $name): FieldSetConfigurator
    {
        if (!isset($this->configurators[$name])) {
            if (isset($this->serviceIds[$name])) {
                $configurator = $this->container->get($this->serviceIds[$name]);
            } elseif (class_exists($name)) {
                // Support fully-qualified class names.
                $configurator = new $name();
            } else {
                throw new InvalidArgumentException(sprintf('Could not load FieldSet configurator "%s".', $name));
            }

            if (!$configurator instanceof FieldSetConfigurator) {
                throw new InvalidArgumentException(sprintf('Configurator class "%s" is expected to be an instance of '.FieldSetConfigurator::class, $name));
            }

            $this->configurators[$name] = $configurator;
        }

        return $this->configurators[$name];
    }
114203
public function extractBundleConfigurationFromKernel($name)
    {
        $kernelBundles = $this->getContainer()->get('kernel')->getBundles();
        $bundle = null;

        if (preg_match('/Bundle$/', $name)) {
            if (!isset($kernelBundles[$name])) {
                throw new \LogicException(sprintf('Bundle "%s" does not exists or is not activated.', $name));
            }

            $bundle = $kernelBundles[$name];
        } else {
            foreach ($kernelBundles as $kernelBundle) {
                $extension = $kernelBundle->getContainerExtension();

                if ($extension && $extension->getAlias() == $name) {
                    $bundle = $kernelBundle;
                    break;
                }
            }

            if (null === $bundle) {
                throw new \LogicException(sprintf('Bundle with alias "%s" does not exists or is not activated.', $name));
            }
        }

        $bundleContainer = $this->getContainer()->get('atoum.configuration.bundle.container');

        if ($bundleContainer->has($bundle->getName())) {
            return $bundleContainer->get($bundle->getName());
        } else {
            return new BundleConfiguration($bundle->getName(), $this->getDefaultDirectoriesForBundle($bundle));
        }
    }
237763
public function getCustomConfig($name = '')
    {
        $custom_config = $this->getConfigByName('custom');
        return $name ? ($custom_config[$name] ?? null) : $custom_config;
    }
520688
public function getPlugin($name)
    {
        if (isset($this->plugins[$name])) {
            return $this->plugins[$name];
        }

        return null;
    }
68214
protected function normalizeName($name)
    {
        $ext = pathinfo($name, PATHINFO_EXTENSION);

        if ($ext === 'twig') {
            $name = substr($name, 0, -5);
        }

        $path = preg_replace('#/{2,}#', '/', str_replace($this->separator, '/', $name));

        return $path . '.twig';
    }
423762
public function getElementsByName($name) {

		if(isset($this->elements[$name])) {
			return $this->elements[$name];
		}
		
		throw new \InvalidArgumentException(sprintf("Unknown form element '%s'", $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];
    }
222536
public function getProvider(string $name) : string
    {
        $providers = $this->getProviders();
        if (!in_array($name, array_keys($providers))) {
            throw new InvalidArgumentException("Provider for [$name] is not configured");
        }

        return $providers[$name];
    }