Refactored the configuration tree
This commit is contained in:
parent
f64c5af86d
commit
fbf2f279f0
|
@ -121,6 +121,13 @@ class Configuration implements ConfigurationInterface
|
|||
->prototype('scalar')->end()
|
||||
->end()
|
||||
->end()
|
||||
->fixXmlConfig('setting')
|
||||
->children()
|
||||
->arrayNode('settings')
|
||||
->useAttributeAsKey('key')
|
||||
->prototype('scalar')->end()
|
||||
->end()
|
||||
->end()
|
||||
->fixXmlConfig('connection')
|
||||
->append($this->getDbalConnectionsNode())
|
||||
->end()
|
||||
|
@ -152,26 +159,36 @@ class Configuration implements ConfigurationInterface
|
|||
->useAttributeAsKey('name')
|
||||
->prototype('array')
|
||||
->children()
|
||||
->scalarNode('driver')->defaultValue('mysql')->end()
|
||||
->scalarNode('user')->defaultValue('root')->end()
|
||||
->scalarNode('password')->defaultValue('')->end()
|
||||
->scalarNode('dsn')->defaultValue('')->end()
|
||||
->scalarNode('classname')->defaultValue($this->debug ? 'DebugPDO' : 'PropelPDO')->end()
|
||||
->end()
|
||||
->fixXmlConfig('option')
|
||||
->children()
|
||||
->arrayNode('options')
|
||||
->useAttributeAsKey('key')
|
||||
->prototype('scalar')->end()
|
||||
->scalarNode('driver')->defaultValue('mysql')->end()
|
||||
->scalarNode('user')->defaultValue('root')->end()
|
||||
->scalarNode('password')->defaultValue('')->end()
|
||||
->scalarNode('dsn')->defaultValue('')->end()
|
||||
->scalarNode('classname')->defaultValue($this->debug ? 'DebugPDO' : 'PropelPDO')->end()
|
||||
->end()
|
||||
->end()
|
||||
->fixXmlConfig('attribute')
|
||||
->children()
|
||||
->arrayNode('attributes')
|
||||
->useAttributeAsKey('key')
|
||||
->prototype('scalar')->end()
|
||||
->fixXmlConfig('option')
|
||||
->children()
|
||||
->arrayNode('options')
|
||||
->useAttributeAsKey('key')
|
||||
->prototype('scalar')->end()
|
||||
->end()
|
||||
->end()
|
||||
->fixXmlConfig('attribute')
|
||||
->children()
|
||||
->arrayNode('attributes')
|
||||
->useAttributeAsKey('key')
|
||||
->prototype('scalar')->end()
|
||||
->end()
|
||||
->end()
|
||||
->fixXmlConfig('setting')
|
||||
->children()
|
||||
->arrayNode('settings')
|
||||
->useAttributeAsKey('key')
|
||||
->prototype('array')
|
||||
->useAttributeAsKey('key')
|
||||
->prototype('scalar')
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
;
|
||||
|
||||
return $node;
|
||||
|
|
Loading…
Reference in a new issue