Force slash at the end of the url parameter

This commit is contained in:
tgallice 2014-02-04 10:07:58 +01:00
parent 82e9809ceb
commit 04390b37d1

View file

@ -101,7 +101,12 @@ class Configuration implements ConfigurationInterface
->arrayNode('servers')
->prototype('array')
->children()
->scalarNode('url')->end()
->scalarNode('url')
->validate()
->ifTrue(function($v) { return substr($v['url'], -1) !== '/'; })
->then(function($v) { return $v['url'].'/'; })
->end()
->end()
->scalarNode('host')->end()
->scalarNode('port')->end()
->scalarNode('logger')