Hi, 

Something I quite often miss is the option to map a query parameter into the 
route - not for route matching but as a way to add it to the command 
function. For example if I'm implementing a search function, then it is not 
natural to place the query in the path of the route, but it would be very 
useful to be able to match the query within the route. Something like:

hello:
    pattern:      /query
    defaults:     { _controller: SearchBundle:Search:index }
    queryParams: { query: { default: "" }, page: { default: 10 , require: "\d+" 
} }
or:
    pattern:      /query?query={".+"}&require={\d+}
but the last option has the downside of signaling that the query params are 
used for routing. 
 
And have:
class SearchController extends Controller{
    public function indexAction($query, $page)
    {
      
    }}

Has this usecase been considered?

Kind regards,
Tarjei 

-- 
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 developers" 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-devs?hl=en

Reply via email to