comsave/salesforce-outbound-message-bundle

View on GitHub
src/Comsave/SalesforceOutboundMessageBundle/DependencyInjection/Configuration.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace Comsave\SalesforceOutboundMessageBundle\DependencyInjection;

use Symfony\Component\Config\Definition\Builder\ScalarNodeDefinition;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
use Symfony\Component\HttpKernel\Kernel;

class Configuration implements ConfigurationInterface
{
    /** @var string */
    private $symfonyVersion = Kernel::VERSION;

    public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('comsave_salesforce_outbound_message');
        $rootNode
            ->children()
                ->scalarNode('wsdl_cache')->defaultValue('WSDL_CACHE_DISK')->end()
                ->scalarNode('wsdl_directory')->isRequired()->end()
                ->arrayNode('document_paths')
                    ->arrayPrototype()
                        ->children()
                            ->scalarNode('path')->end()
                            ->scalarNode('force_compare')->end()
                        ->end()
                    ->end()
                ->end()
            ->end();

        return $treeBuilder;
    }
}