All three questions have now been answered. I figured out the first two just 
now.

#1 & #2: Yes you can capture the leading /, and even a missing leading /. 
Also you can capture slashes (most useful in the final parameter). When I 
write:

show:
    pattern:  /:slug
    defaults: { _controller: SillyCMSBundle:Page:show }
    requirements: { slug: .* }

My show action fires for all URLs not matched up until that point. Empty, /, 
/foo, and /foo/bar all work, just as with Symfony 1.x

My problem earlier seems to have been unnecessary / / around the regexp.

#3: you can get named parameters with ->get('request')->get('foo') just like 
getting GET method parameters, so yes, you can write actions without forcing 
the routes to be written in a particular way if you so choose.

Very nice stuff.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to