On 11/18/10 11:41 PM, Thomas Rabaix wrote:
I prefer the ':' syntax. just make thing more readable. I don't see the point of a default value, the default value should be defined in the controller when we need to use it. I don't see any use case where the default value should be used (at least I never used this feature ...) for generating the url.
The default value was just an example of the spec. Actually, this is already possible with the current version via the default values.
Fabien
On Thu, Nov 18, 2010 at 11:28 PM, Tim Nagel <[email protected] <mailto:[email protected]>> wrote: Looks good, +1 On Fri, Nov 19, 2010 at 09:20, Fabien Potencier <[email protected] <mailto:[email protected]>> wrote: The current implementation of the routing uses a colon (':') as a delimiter for placeholders in patterns: /article/:id This convention was already used in symfony1 and comes from the Ruby world (where :something has a meaning.) But, :something has no special meaning in PHP and so, this is just a convention. I propose to use the "URI template" notation instead: http://code.google.com/p/uri-templates/ http://tools.ietf.org/html/draft-gregorio-uritemplate-04 The above example would be written like this: /article/{id} It does not make sense to implement the whole specification in our context, and so I'm just proposing to use the same conventions described in the specification. For instance, we can probably also implement the default value: /article/{id=1} Fabien -- Fabien Potencier Sensio CEO - symfony lead developer sensiolabs.com <http://sensiolabs.com> | symfony-project.org <http://symfony-project.org> | fabien.potencier.org <http://fabien.potencier.org> Tél: +33 1 40 99 80 80 -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com <http://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] <mailto:[email protected]> To unsubscribe from this group, send email to [email protected] <mailto:symfony-devs%[email protected]> For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com <http://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] <mailto:[email protected]> To unsubscribe from this group, send email to [email protected] <mailto:symfony-devs%[email protected]> For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en -- Thomas Rabaix http://rabaix.net -- 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
-- 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
