Gets the rest configuration node.

@return  \Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition
426504
private function getRestNode()
    {
        $node = $this->createRootNode('rest');
        return $node
            ->addDefaultsIfNotSet()
            ->children()
                ->scalarNode('root_endpoint')->isRequired()->cannotBeEmpty()->defaultValue('modlr/api')
                    ->validate()
                        ->always(function($v) {
                            $v = $this->formatRestEndpoint($v);
                            return $v;
                        })
                    ->end()
                ->end()
                ->booleanNode('debug')->defaultValue(false)->end()
            ->end()

        ;
    }
52209
public function getConfigTreeBuilder()
    {
        $builder = new TreeBuilder();
        $rule    = $builder->root('rule');
        {
            $rule->children()->variableNode('pattern')->isRequired();
            $rule->children()->variableNode('roles')->isRequired()->beforeNormalization()->ifString()->then(
                function ($v) {
                    return [$v];
                }
            )->end();
            $rule->children()->enumNode('channel')->values([null, 'http', 'https'])->defaultValue(null);

        }

        return $builder;
    }
637711
public function getNode(): NodeInterface
    {
        if (null === $this->node) {
            $this->node = XmlNodeUtils::nodeFromXmlElement($this->document->documentElement);
        }
        return $this->node;
    }
1157149
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder(static::ROOT_NODE);

        if (method_exists($treeBuilder, 'getRootNode')) {
            // Symfony 4.2 +
            $rootNode = $treeBuilder->getRootNode();
        } else {
            // Symfony 4.1 and below
            $rootNode = $treeBuilder->root(static::ROOT_NODE);
        }

        return
            $rootNode
                ->children()
                    ->scalarNode('cache')
                        ->cannotBeEmpty()
                        ->defaultValue('%kernel.cache_dir%/GeoLite2-City.mmdb')
                    ->end()
                    ->scalarNode('url')
                        ->cannotBeEmpty()
                        ->defaultValue('https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz')
                    ->end()
                    ->arrayNode('locales')
                        ->treatNullLike([])
                        ->prototype('scalar')->end()
                        ->defaultValue(['%locale%'])
                    ->end()
                ->end()
            ->end()
        ;
    }
290223
public function getConfig(): array
    {
        $structure = [
            'locationMappings' => [],
            'defaultMappings' => [],
            'fallbackContentType' => $this->buildFallbackContentTypeStructure($this->fallbackContentType),
            'maxFileSize' => $this->maxFileSize,
        ];

        foreach ($this->locationMappings as $locationIdentifier => $locationConfiguration) {
            $structure['locationMappings'][$locationIdentifier] = [
                'contentTypeIdentifier' => $locationConfiguration['content_type_identifier'],
                'mimeTypeFilter' => $locationConfiguration['mime_type_filter'],
                'mappings' => [],
            ];

            foreach ($locationConfiguration['mappings'] as $mappingGroup) {
                $structure['locationMappings'][$locationIdentifier]['mappings'][] = $this->buildMappingGroupStructure($mappingGroup);
            }
        }

        foreach ($this->defaultMappings as $mappingGroup) {
            $structure['defaultMappings'][] = $this->buildMappingGroupStructure($mappingGroup);
        }

        return $structure;
    }
1057963
public function getConfigTreeBuilder()
    {
        $builder = new TreeBuilder();
        $http    = $builder->root('http');
        {
            $http->children()->scalarNode('cache_dir')->defaultValue(null);
            $http->children()->booleanNode('behind_elb')->defaultValue(false);
            $http->children()->booleanNode('trust_cloudfront_ips')->defaultValue(false);
            $http->children()->variableNode('trusted_proxies');
            $http->children()->variableNode('trusted_header_set');
            $http->children()->variableNode('routing');
            $http->children()->variableNode('twig');
            $http->children()->variableNode('security');
            $http->children()->variableNode('cors');
            $http->children()->variableNode('view_handlers');
            $http->children()->variableNode('error_handlers');
            $http->children()->variableNode('injected_args');
            $http->children()->variableNode('middlewares');
            $http->children()->variableNode('providers');
        }
        
        return $builder;
    }
19823
public function get($node = null)
    {
        if ($node !== null) {
            $nodes         = explode(':', $node);
            $configuration = $this->getConfiguration();
            foreach ($nodes as $node) {
                $configuration = $configuration->{$node};
            }
        } else {
            $configuration = $this->getConfiguration();
        }

        return $configuration;
    }
360918
public function getApiConfig()
    {
        if (empty($this->apiConfig)) {
            $this->apiConfig = \Webiny\Component\Rest\Rest::getConfig()->{$this->api};
        }

        return $this->apiConfig;
    }
165764
public function getConfig(ArrayNodeDefinition $builder)
    {
        $builder->
            children()->
                scalarNode('working_dir')->
                    defaultValue('tmp/montserrat')->
                end()->
                arrayNode('prepend_paths')->
                    prototype('scalar')->
                end()->
            end()->
        end();
    }
487041
public function getConfiguration(){
        $rest = $this->getService( self::API_CONNECTION_CONFIG);
        $rest->GET();

        return $rest->getResult( models\Connection\Config::class);
    }
623484
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('workflow');

        $rootNode
            ->fixXmlConfig('workflow')
            ->children()
                ->arrayNode('workflows')
                    ->useAttributeAsKey('name')
                    ->prototype('array')
                        ->fixXmlConfig('support')
                        ->fixXmlConfig('place')
                        ->fixXmlConfig('transition')
                        ->children()
                            ->enumNode('type')
                                ->values(array('workflow', 'state_machine'))
                                ->defaultValue('workflow')
                            ->end()
                            ->arrayNode('marking_store')
                                ->fixXmlConfig('argument')
                                ->children()
                                    ->enumNode('type')
                                        ->values(array('multiple_state', 'single_state'))
                                    ->end()
                                    ->arrayNode('arguments')
                                        ->beforeNormalization()
                                            ->ifString()
                                            ->then(function ($v) { return array($v); })
                                        ->end()
                                        ->requiresAtLeastOneElement()
                                        ->prototype('scalar')
                                        ->end()
                                    ->end()
                                    ->scalarNode('service')
                                        ->cannotBeEmpty()
                                    ->end()
                                ->end()
                                ->validate()
                                    ->ifTrue(function ($v) { return isset($v['type']) && isset($v['service']); })
                                    ->thenInvalid('"type" and "service" cannot be used together.')
                                ->end()
                                ->validate()
                                    ->ifTrue(function ($v) { return !empty($v['arguments']) && isset($v['service']); })
                                    ->thenInvalid('"arguments" and "service" cannot be used together.')
                                ->end()
                            ->end()
                            ->arrayNode('supports')
                                ->isRequired()
                                ->beforeNormalization()
                                    ->ifString()
                                    ->then(function ($v) { return array($v); })
                                ->end()
                                ->prototype('scalar')
                                    ->cannotBeEmpty()
                                    ->validate()
                                        ->ifTrue(function ($v) { return !class_exists($v); })
                                        ->thenInvalid('The supported class %s does not exist.')
                                    ->end()
                                ->end()
                            ->end()
                            ->scalarNode('initial_place')->defaultNull()->end()
                            ->arrayNode('places')
                                ->isRequired()
                                ->requiresAtLeastOneElement()
                                ->prototype('scalar')
                                    ->cannotBeEmpty()
                                ->end()
                            ->end()
                            ->arrayNode('transitions')
                                ->useAttributeAsKey('name')
                                ->isRequired()
                                ->requiresAtLeastOneElement()
                                ->prototype('array')
                                    ->children()
                                        ->arrayNode('from')
                                            ->beforeNormalization()
                                                ->ifString()
                                                ->then(function ($v) { return array($v); })
                                            ->end()
                                            ->requiresAtLeastOneElement()
                                            ->prototype('scalar')
                                                ->cannotBeEmpty()
                                            ->end()
                                        ->end()
                                        ->arrayNode('to')
                                            ->beforeNormalization()
                                                ->ifString()
                                                ->then(function ($v) { return array($v); })
                                            ->end()
                                            ->requiresAtLeastOneElement()
                                            ->prototype('scalar')
                                                ->cannotBeEmpty()
                                            ->end()
                                        ->end()
                                    ->end()
                                ->end()
                            ->end()
                        ->end()
                    ->end()
                ->end()
            ->end()
        ;

        return $treeBuilder;
    }
1229646
public function getConfiguration()
    {
        $driverChain = $this->getMetadataDriverImpl();
        // Inject the driverChain into the doctrine config
        $this->configuration->setMetadataDriverImpl($driverChain);
        return $this->configuration;
    }
453249
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root($this->root);

        $rootNode
            ->children()
            ->scalarNode('home_route')->defaultValue('eavmanager_layout.dashboard')->end()
            ->append($this->getMailerConfigurationTreeBuilder())
            ->end();

        return $treeBuilder;
    }
1009151
public function getConfiguration()
    {
        if (is_null($this->_configuration)) {
            $this->_configuration = Configuration::get('config');
        }
        return $this->_configuration;
    }
309085
private function createClientsNode() : ArrayNodeDefinition
    {
        $builder = new TreeBuilder('clients');

        /** @var \Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition $node */
        if (method_exists($builder, 'getRootNode')) {
            $node = $builder->getRootNode();
        } else {
            // BC layer for symfony/config 4.1 and older
            $node = $builder->root('clients');
        }

        /** @var \Symfony\Component\Config\Definition\Builder\NodeBuilder $nodeChildren */
        $nodeChildren = $node->useAttributeAsKey('name')
            ->prototype('array')
                ->children();

        $nodeChildren->scalarNode('class')->defaultValue('%eight_points_guzzle.http_client.class%')->end()
                    ->scalarNode('base_url')
                        ->defaultValue(null)
                        ->validate()
                            ->ifTrue(function ($v) {
                                return !is_string($v);
                            })
                            ->thenInvalid('base_url can be: string')
                        ->end()
                    ->end()
                    ->booleanNode('lazy')->defaultValue(false)->end()
                    ->scalarNode('handler')
                        ->defaultValue(null)
                        ->validate()
                            ->ifTrue(function ($v) {
                                return $v !== null && (!is_string($v) || !class_exists($v));
                            })
                            ->thenInvalid('handler must be a valid FQCN for a loaded class')
                        ->end()
                    ->end()
                    ->arrayNode('options')
                        ->validate()
                            ->ifTrue(function ($options) {
                                return count($options['form_params']) && count($options['multipart']);
                            })
                            ->thenInvalid('You cannot use form_params and multipart at the same time.')
                        ->end()
                        ->children()
                            ->arrayNode('headers')
                                ->useAttributeAsKey('name')
                                ->normalizeKeys(false)
                                ->prototype('scalar')->end()
                            ->end()
                            ->variableNode('allow_redirects')
                                ->validate()
                                    ->ifTrue(function ($v) {
                                        return !is_array($v) && !is_bool($v);
                                    })
                                    ->thenInvalid('allow_redirects can be: bool or array')
                                ->end()
                            ->end()
                            ->variableNode('auth')
                                ->validate()
                                    ->ifTrue(function ($v) {
                                        return !is_array($v) && !is_string($v);
                                    })
                                    ->thenInvalid('auth can be: string or array')
                                ->end()
                            ->end()
                            ->variableNode('query')
                                ->validate()
                                    ->ifTrue(function ($v) {
                                        return !is_string($v) && !is_array($v);
                                    })
                                    ->thenInvalid('query can be: string or array')
                                ->end()
                            ->end()
                            ->arrayNode('curl')
                                ->beforeNormalization()
                                    ->ifArray()
                                        ->then(function (array $curlOptions) {
                                            $result = [];

                                            foreach ($curlOptions as $key => $value) {
                                                $optionName = 'CURLOPT_' . strtoupper($key);

                                                if (!defined($optionName)) {
                                                    throw new InvalidConfigurationException(sprintf(
                                                        'Invalid curl option in eight_points_guzzle: %s. ' .
                                                        'Ex: use sslversion for CURLOPT_SSLVERSION option. ' . PHP_EOL .
                                                        'See all available options: http://php.net/manual/en/function.curl-setopt.php',
                                                        $key
                                                    ));
                                                }

                                                $result[constant($optionName)] = $value;
                                            }

                                            return $result;
                                        })
                                    ->end()
                                    ->prototype('scalar')
                                ->end()
                            ->end()
                            ->variableNode('cert')
                                ->validate()
                                    ->ifTrue(function ($v) {
                                        return !is_string($v) && (!is_array($v) || count($v) !== 2);
                                    })
                                    ->thenInvalid('cert can be: string or array with two entries (path and password)')
                                ->end()
                            ->end()
                            ->scalarNode('connect_timeout')
                                ->beforeNormalization()
                                    ->always(function ($v) {
                                        return is_numeric($v) ? (float) $v : $v;
                                    })
                                ->end()
                                ->validate()
                                    ->ifTrue(function ($v) {
                                        return !is_float($v) && !(is_string($v) && strpos($v, 'env_') === 0);
                                    })
                                    ->thenInvalid('connect_timeout can be: float')
                                ->end()
                            ->end()
                            ->booleanNode('debug')->end()
                            ->variableNode('decode_content')
                                ->validate()
                                    ->ifTrue(function ($v) {
                                        return !is_string($v) && !is_bool($v);
                                    })
                                    ->thenInvalid('decode_content can be: bool or string (gzip, compress, deflate, etc...)')
                                ->end()
                            ->end()
                            ->floatNode('delay')->end()
                            ->arrayNode('form_params')
                                ->useAttributeAsKey('name')
                                ->prototype('variable')->end()
                            ->end()
                            ->arrayNode('multipart')
                                ->prototype('variable')->end()
                            ->end()
                            ->scalarNode('sink')
                                ->validate()
                                    ->ifTrue(function ($v) {
                                        return !is_string($v);
                                    })
                                    ->thenInvalid('sink can be: string')
                                ->end()
                            ->end()
                            ->booleanNode('http_errors')->end()
                            ->variableNode('expect')
                                ->validate()
                                    ->ifTrue(function ($v) {
                                        return !is_bool($v) && !is_int($v);
                                    })
                                    ->thenInvalid('expect can be: bool or int')
                                ->end()
                            ->end()
                            ->variableNode('ssl_key')
                                ->validate()
                                    ->ifTrue(function ($v) {
                                        return !is_string($v) && (!is_array($v) || count($v) !== 2);
                                    })
                                    ->thenInvalid('ssl_key can be: string or array with two entries (path and password)')
                                ->end()
                            ->end()
                            ->booleanNode('stream')->end()
                            ->booleanNode('synchronous')->end()
                            ->scalarNode('read_timeout')
                                ->beforeNormalization()
                                    ->always(function ($v) {
                                        return is_numeric($v) ? (float) $v : $v;
                                    })
                                ->end()
                                ->validate()
                                    ->ifTrue(function ($v) {
                                        return !is_float($v) && !(is_string($v) && strpos($v, 'env_') === 0);
                                    })
                                    ->thenInvalid('read_timeout can be: float')
                                ->end()
                            ->end()
                            ->scalarNode('timeout')
                                ->beforeNormalization()
                                    ->always(function ($v) {
                                        return is_numeric($v) ? (float) $v : $v;
                                    })
                                ->end()
                                ->validate()
                                    ->ifTrue(function ($v) {
                                        return !is_float($v) && !(is_string($v) && strpos($v, 'env_') === 0);
                                    })
                                    ->thenInvalid('timeout can be: float')
                                ->end()
                            ->end()
                            ->variableNode('verify')
                                ->validate()
                                    ->ifTrue(function ($v) {
                                        return !is_bool($v) && !is_string($v);
                                    })
                                    ->thenInvalid('verify can be: bool or string')
                                ->end()
                            ->end()
                            ->booleanNode('cookies')->end()
                            ->arrayNode('proxy')
                                ->beforeNormalization()
                                ->ifString()
                                    ->then(function($v) { return ['http'=> $v]; })
                                ->end()
                                ->validate()
                                    ->always(function($v) {
                                        if (empty($v['no'])) {
                                            unset($v['no']);
                                        }
                                        return $v;
                                    })
                                ->end()
                                ->children()
                                    ->scalarNode('http')->end()
                                    ->scalarNode('https')->end()
                                    ->arrayNode('no')
                                        ->prototype('scalar')->end()
                                    ->end()
                                ->end()
                            ->end()
                            ->scalarNode('version')
                                ->validate()
                                    ->ifTrue(function ($v) {
                                        return !is_string($v) && !is_float($v);
                                    })
                                    ->thenInvalid('version can be: string or float')
                                ->end()
                            ->end()
                        ->end()
                    ->end();

        $pluginsNode = $nodeChildren->arrayNode('plugin')->addDefaultsIfNotSet();

        foreach ($this->plugins as $plugin) {
            $pluginNode = new ArrayNodeDefinition($plugin->getPluginName());

            $plugin->addConfiguration($pluginNode);

            $pluginsNode->children()->append($pluginNode);
        }

        return $node;
    }
31793
public function getConfigTreeBuilder()
    {
        $builder = new TreeBuilder();
        $cors    = $builder->root('cors');
        {
            $cors->children()->scalarNode('pattern')->isRequired();
            $cors->children()->variableNode('origins')->beforeNormalization()->ifString()->then(
                function ($v) {
                    return [$v];
                }
            );
            $cors->children()->variableNode('headers');
            $cors->children()->variableNode('headers_exposed');
            $cors->children()->integerNode('max_age')->defaultValue(86400);
            $cors->children()->booleanNode('credentials_allowed')->defaultValue(false);
        }

        return $builder;
    }
767457
public function getConfigTreeBuilder()
    {
        $builder  = new TreeBuilder();
        $firewall = $builder->root('firewall');
        {
            $firewall->children()->variableNode('pattern')->isRequired();
            $firewall->children()->variableNode('policies')->isRequired();
            $firewall->children()->variableNode('users')->isRequired();
            $firewall->children()->booleanNode('stateless')->defaultValue('false');
            $firewall->children()->variableNode('misc')->defaultValue([]);
        }

        return $builder;
    }