#1291: Routing fails to refill all parameters when same parameter name used in
consecutive route elements
--------------------------------------------------------------------------------------+
 Reporter:  nik_makepe...@…                                                     
      |        Owner:  dominik
     Type:  defect                                                              
      |       Status:  closed 
 Priority:  normal                                                              
      |    Milestone:  1.0.4  
Component:  routing                                                             
      |      Version:  1.0.3  
 Severity:  normal                                                              
      |   Resolution:  wontfix
 Keywords:  routing refill_all_parameters surprising-behaviour 
documentation-missing  |    Has_patch:  0      
--------------------------------------------------------------------------------------+
Changes (by david):

  * status:  new => closed
  * resolution:  => wontfix


Comment:

 The purpose of the {{{*}}} operator is to re-fill all the parameters of a
 route if you re-generate it with different parameters. Normally, only
 parameters to the left of the parameter you're supplying are re-filled
 based on the matched values, but not those to the right hand side.

 Consider this example:
 {{{
 #!xml
 <route name="gallery"
 pattern="^/products/(id:\d+)/gallery/(type:(videos|photos)/$" … />
 }}}

 Assume the incoming URL is "/products/123/gallery/photos/". If you now do
 {{{
 #!php
 <?php $ro->gen('gallery', array('id' => 456)); ?>
 }}}
 you will get "/products/456/gallery//". If, however, you do
 {{{
 #!php
 <?php $ro->gen('gallery*', array('id' => 456)); ?>
 }}}
 you will get "/products/456/gallery/photos/".

 Either way, as I already said, if you have reasonably structured URLs, you
 can avoid this situation in many cases.

 Resolving as ''wontfix'' as this is by design.

-- 
Ticket URL: <http://trac.agavi.org/ticket/1291#comment:2>
Agavi <http://www.agavi.org/>
An MVC Framework for PHP5



_______________________________________________
Agavi Tickets Mailing List
[email protected]
http://lists.agavi.org/mailman/listinfo/tickets

Reply via email to