Get definition form container.

@param CompilerExtension $compilerExtension
@param string            $indexConfig
@param string            $prefixName
@return ServiceDefinition
197887
public static function getDefinitionFormContainer(CompilerExtension $compilerExtension, $indexConfig = 'formContainer', $prefixName = 'formContainer'): ServiceDefinition
    {
        $builder = $compilerExtension->getContainerBuilder();
        $config = $compilerExtension->getConfig();

        return $builder->addDefinition($compilerExtension->prefix($prefixName))
            ->setFactory($config[$indexConfig])
            ->setAutowired($config['autowired']);
    }
800250
public static function getAssetsFolder(string $extensionKey, string $prefix = 'EXT:'): string {
    return self::assetsFolder($extensionKey, $prefix);
  }
1171540
public void getConfigurationInto(Entries configuration) {
    for (String prefix : prefixes) {
      configuration.setBoolean(prefix + ENABLE_SERVICE_ACCOUNTS_SUFFIX, isServiceAccountEnabled());
      if (getServiceAccountEmail() != null) {
        configuration.set(prefix + SERVICE_ACCOUNT_EMAIL_SUFFIX, getServiceAccountEmail());
      }
      if (getServiceAccountPrivateKeyId() != null) {
        configuration.set(
            prefix + SERVICE_ACCOUNT_PRIVATE_KEY_ID_SUFFIX, getServiceAccountPrivateKeyId());
      }
      if (getServiceAccountPrivateKey() != null) {
        configuration.set(
            prefix + SERVICE_ACCOUNT_PRIVATE_KEY_SUFFIX, getServiceAccountPrivateKey());
      }
      if (getServiceAccountKeyFile() != null) {
        configuration.set(prefix + SERVICE_ACCOUNT_KEYFILE_SUFFIX, getServiceAccountKeyFile());
      }
      if (getServiceAccountJsonKeyFile() != null) {
        configuration.set(prefix + JSON_KEYFILE_SUFFIX, getServiceAccountJsonKeyFile());
      }
      if (getClientId() != null) {
        configuration.set(prefix + CLIENT_ID_SUFFIX, getClientId());
      }
      if (getClientSecret() != null) {
        configuration.set(prefix + CLIENT_SECRET_SUFFIX, getClientSecret());
      }
      if (getOAuthCredentialFile() != null) {
        configuration.set(prefix + OAUTH_CLIENT_FILE_SUFFIX, getOAuthCredentialFile());
      }
      configuration.setBoolean(prefix + ENABLE_NULL_CREDENTIAL_SUFFIX, isNullCredentialEnabled());
    }

    // Transport configuration does not use prefixes
    if (getProxyAddress() != null) {
      configuration.set(PROXY_ADDRESS_KEY, getProxyAddress());
    }
    if (getProxyUsername() != null) {
      configuration.set(PROXY_USERNAME_KEY, getProxyUsername());
    }
    if (getProxyPassword() != null) {
      configuration.set(PROXY_PASSWORD_KEY, getProxyPassword());
    }
    configuration.set(HTTP_TRANSPORT_KEY, getTransportType().name());
  }
335620
public function getService($serviceName)
    {
        $serviceName = ltrim($serviceName, '@');
        if (!isset($this->registeredServices[$serviceName])) {
            throw new ServiceManagerException(ServiceManagerException::SERVICE_DEFINITION_NOT_FOUND, [$serviceName]);
        }

        // Instantiate new service or get existing service instance
        if (!isset($this->instantiatedServices[$serviceName])) {
            $service = $this->instantiateService($serviceName);
        } else {
            $service = $this->instantiatedServices[$serviceName];
        }

        return $service;
    }
626454
public function compileRoute($prefixName, \ReflectionClass $class, \ReflectionMethod $method, Route $route = null)
    {
        $collection = new RouteCollection();

        $routeAnnotations = array();
        $methodAnnotaion = null;

        /*
         * Parse method annotation
         */
        $methodAnnotaions = $this->extractorFactory->extract($method, Extractor::METHOD_ANNOTATAION);
        foreach ($methodAnnotaions as $key => $annoation) {
            if ($annoation instanceof Route) {
                $routeAnnotations[] = $annoation;
            }
            if ($annoation instanceof Method) {
                $methodAnnotaion = $annoation;
            }
        }

        $name = $route->getName() ?: strtolower($prefixName.'_'.$method->getName());
        if (empty($routeAnnotations)) {
            $this->addRoute($class, $method, $collection, $name, $route, null, null);
        } else {
            foreach ($routeAnnotations as $routeAnnotation) {
                /* @var Route $routeAnnotation */
                $this->addRoute($class, $method, $collection, $name, $route, $routeAnnotation, $methodAnnotaion);
            }
        }

        return $collection;
    }
135738
private function getAdminServiceId($bundleName, $adminClassBasename)
    {
        $prefix = substr($bundleName, -6) == 'Bundle' ? substr($bundleName, 0, -6) : $bundleName;
        $suffix = substr($adminClassBasename, -5) == 'Admin' ? substr($adminClassBasename, 0, -5) : $adminClassBasename;
        $suffix = str_replace('\\', '.', $suffix);

        return Container::underscore(sprintf(
            '%s.admin.%s',
            $prefix,
            $suffix
        ));
    }
1133990
public function getExtensionConfiguration($configurationName)
    {
        $result = null;
        $extensionConfiguration = $this->getFullExtensionConfiguration();

        if (null === $configurationName) {
            $result = $extensionConfiguration;
        } elseif (ArrayUtility::isValidPath($extensionConfiguration, $configurationName, '.')) {
            $result = ArrayUtility::getValueByPath($extensionConfiguration, $configurationName, '.');
        }

        return $result;
    }
281334
public function getExtension(
        /*# string */ $extensionName
    )/*# : ExtensionAbstract */ {
        if (!$this->hasExtension($extensionName)) {
            $this->addExtension(new $extensionName);
        }
        return $this->extensions[$extensionName];
    }
56050
public function getIndex($indexName)
    {
        $indexName = $this->normalizeIdentifier($indexName);
        if (! $this->hasIndex($indexName)) {
            throw SchemaException::indexDoesNotExist($indexName, $this->_name);
        }

        return $this->_indexes[$indexName];
    }
537334
public static ExtensibleConfigurationPersister createCachedRemoteDomainXmlConfigurationPersister(final File configDir, ExecutorService executorService, ExtensionRegistry extensionRegistry) {
        return createRemoteBackupDomainXmlConfigurationPersister(configDir, executorService, extensionRegistry);
    }
85487
protected function getProviderHandler(Container $app, $prefix)
    {
        return function () use ($app, $prefix) {
            $initializer = $app["$prefix.client_initializer"];

            return $initializer($app);
        };
    }
307709
public function getIndexQueueIndexerConfigurationByConfigurationName($configurationName, $defaultIfEmpty = [])
    {
        $path = 'plugin.tx_solr.index.queue.' . $configurationName . '.indexer.';
        $result = $this->getObjectByPathOrDefault($path, $defaultIfEmpty);
        return $result;
    }
907980
protected function getContainerBuilder()
    {
        $container = new ContainerBuilder();
        $container->getParameterBag()->add($this->getKernelParameters());

        if ($this instanceof CompilerPassInterface) {
            $container->addCompilerPass($this, PassConfig::TYPE_BEFORE_OPTIMIZATION, -10000);
        }
        if (class_exists('ProxyManager\Configuration') && class_exists('Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator')) {
            $container->setProxyInstantiator(new RuntimeInstantiator());
        }

        return $container;
    }
1139134
public function getIndex($indexName)
    {
        return $this->reduceFirst(function (SearchProviderInterface $provider) use ($indexName) {
            return $provider->getIndex($this->indexNamePrefix . $indexName);
        });
    }
1361271
public function buildContainer(
        ExtensionInterface $extension = null,
        array $config = [],
        array $parameters = [],
        array $compilerPasses = []
    ) {
        $container = new ContainerBuilder();
        if ($extension !== null) {
            $extension->setConfigDirectories($this->configDirectories);
            $extension->buildContainer($container, $config);
        }
        foreach ($parameters as $key => $value) {
            $container->setParameter($key, $value);
        }
        foreach ($compilerPasses as $compilerPass) {
            $container->addCompilerPass($compilerPass);
        }
        $container->compile();

        return $container;
    }
869205
public static function getPlaceholdersFolder(string $extensionKey, string $prefix = 'EXT:'): string {
    return self::placeholdersFolder($extensionKey, $prefix);
  }
938743
protected function lexExecutableDefinition(): ExecutableDefinitionNodeInterface
    {
        if ($this->peek(TokenKindEnum::NAME)) {
            // Valid names are: query, mutation, subscription and fragment
            $token = $this->lexer->getToken();

            switch ($token->getValue()) {
                case KeywordEnum::QUERY:
                case KeywordEnum::MUTATION:
                case KeywordEnum::SUBSCRIPTION:
                    return $this->lexOperationDefinition();
                case KeywordEnum::FRAGMENT:
                    return $this->lexFragmentDefinition();
            }
        } elseif ($this->peek(TokenKindEnum::BRACE_L)) {
            // Anonymous query
            return $this->lexOperationDefinition();
        }

        throw $this->unexpected();
    }