Zend Framework 2 URL seems to ignore optional [/] when generating URLs?

I have a route like in my module.config.php that looks like

'route' => '/service-form/key[/][:id][/][:step]',

Despite the / being wrapped in brackets, using $this->url() returns a URL like /service-form/key// with two ending slashes. Why is this? I was under the impression that brackets made part of the route optional. Is that not the case?

Thanks in advance,


You can try this instead

'route'    => '/service-form/key[/:id][/:step]',

See ZF2 Routing for more details

Need Your Help

Map of all svn revision numbers <=> git SHA-1 commit hashes

git svn logging git-svn

When git-svn needs to rebuild its internal map, it outputs the wanted information to STDERR:

How can I flip a CALayer with CATransform3D?

iphone objective-c

Looking for help on how to have a CALayer flip like a UIView using CATransform3D.