root('storage'); $root->useAttributeAsKey('storage_name') ->prototype('array') ->children() ->scalarNode('type')->isRequired()->cannotBeEmpty()->end() ->scalarNode('bucket')->isRequired()->cannotBeEmpty()->end() ->scalarNode('region')->isRequired()->cannotBeEmpty()->end() ->scalarNode('endpoint')->isRequired()->cannotBeEmpty()->end() ->arrayNode('credentials')->isRequired()->cannotBeEmpty() ->children() ->scalarNode('key')->isRequired()->cannotBeEmpty()->end() ->scalarNode('secret')->isRequired()->cannotBeEmpty()->end() ->end() ->end() ->scalarNode('version')->end() ->scalarNode('path')->end() ->end() ->end() ->end(); return ($treeBuilder); } }