- ->arrayNode('config')
- ->isRequired()
- ->addDefaultsIfNotSet()
- ->children()
- ->scalarNode('prefix')->isRequired()->defaultValue($defaults['config']['prefix'])->end()
- ->scalarNode('name')->isRequired()->defaultValue($defaults['config']['name'])->end()
- ->scalarNode('scheme')->isRequired()->defaultValue($defaults['config']['scheme'])->end()
- ->integerNode('timeout')->isRequired()->min(0)->defaultValue($defaults['config']['timeout'])->end()
- ->scalarNode('agent')->isRequired()->defaultValue($defaults['config']['agent'])->end()
- ->integerNode('redirect')->isRequired()->min(1)->defaultValue($defaults['config']['redirect'])->end()
- ->end()
- ->end()
- ->arrayNode('output')
- ->isRequired()
- ->addDefaultsIfNotSet()
- ->children()
- ->scalarNode('css')->isRequired()->defaultValue($defaults['output']['css'])->end()
- ->scalarNode('js')->isRequired()->defaultValue($defaults['output']['js'])->end()
- ->scalarNode('img')->isRequired()->defaultValue($defaults['output']['img'])->end()
+ ->scalarNode('name')->cannotBeEmpty()->defaultValue($defaults['config']['name'])->end()
+ ->scalarNode('scheme')->cannotBeEmpty()->defaultValue($defaults['config']['scheme'])->end()
+ ->integerNode('timeout')->min(0)->max(300)->defaultValue($defaults['config']['timeout'])->end()
+ ->scalarNode('agent')->cannotBeEmpty()->defaultValue($defaults['config']['agent'])->end()
+ ->integerNode('redirect')->min(1)->max(30)->defaultValue($defaults['config']['redirect'])->end()
+ ->end()
+ ->end()
+ ->arrayNode('output')
+ ->addDefaultsIfNotSet()
+ ->children()
+ ->scalarNode('css')->cannotBeEmpty()->defaultValue($defaults['output']['css'])->end()
+ ->scalarNode('js')->cannotBeEmpty()->defaultValue($defaults['output']['js'])->end()
+ ->scalarNode('img')->cannotBeEmpty()->defaultValue($defaults['output']['img'])->end()
+ ->end()
+ ->end()
+ ->arrayNode('filters')
+ ->addDefaultsIfNotSet()
+ ->children()
+ ->arrayNode('css')
+ /**
+ * Undocumented
+ *
+ * @see Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php +513
+ */
+ ->addDefaultChildrenIfNoneSet()
+ ->arrayPrototype()
+ ->children()
+ ->scalarNode('class')
+ ->isRequired()
+ ->cannotBeEmpty()
+ ->defaultValue($defaults['filters']['css'][0]['class'])
+ ->end()
+ ->arrayNode('args')
+ //->isRequired()
+ ->treatNullLike([])
+ ->defaultValue($defaults['filters']['css'][0]['args'])
+ ->scalarPrototype()->end()
+ ->end()
+ ->end()