public function fixXmlConfig($singular, $plural = null) { $this->normalization()->remap($singular, $plural); return $this; }
private function addPostFilterSection(ArrayNodeDefinition $rootNode) { $rootNode ->fixXmlConfig('post_filter') ->children() ->arrayNode('post_filters') ->canBeUnset() ->useAttributeAsKey('name') ->prototype('array') ->fixXmlConfig('param') ->children() ->scalarNode('class')->end() ->arrayNode('params') ->beforeNormalization() ->ifTrue(function($v){ return !is_array($v); }) ->then(function($v){ return array($v); }) ->end() ->prototype('scalar')->end() ->end() ->end() ->end() ->end() ->end() ->end(); }