private function addDoctrineSection()
    {
        $tree = new TreeBuilder();
        $node = $tree->root('doctrine');

        foreach (array('metadata_cache', 'result_cache', 'query_cache') as $type) {
            $node->children()
                ->arrayNode($type)
                    ->canBeUnset()
                    ->children()
                        ->scalarNode('pool')->isRequired()->end()
                        ->scalarNode('prefix')->defaultValue('lmbd')->end()
                    ->end()
                    ->fixXmlConfig('entity_manager')
                    ->children()
                        ->arrayNode('entity_managers')
                            ->defaultValue(array())
                            ->beforeNormalization()->ifString()->then(function($v) { return (array) $v; })->end()
                            ->prototype('scalar')->end()
                        ->end()
                    ->end()
                    ->fixXmlConfig('document_manager')
                    ->children()
                        ->arrayNode('document_managers')
                            ->defaultValue(array())
                            ->beforeNormalization()->ifString()->then(function($v) { return (array) $v; })->end()
                            ->prototype('scalar')->end()
                        ->end()
                    ->end()
                ->end()
            ->end();
        }

        return $node;
    }