#448: Rewrite/refactor parts of routing, at least gen()
---------------------+------------------------------------------------------
 Reporter:  david    |        Owner:  dominik
     Type:  task     |       Status:  new    
 Priority:  high     |    Milestone:  1.0    
Component:  routing  |      Version:         
 Severity:  major    |   Resolution:         
 Keywords:           |  
---------------------+------------------------------------------------------
Comment (by david):

 #630 describes another issue.

 Basically, we should refactor the routing so that any necessary
 encoding/escaping of values is done _afterwards_ by the concrete
 implementation. In case of the WebRouting, that'd be {{{rawurlencode()}}}.

 I had the idea that the returned {{{$path}}} from {{{parent::gen()}}}
 (which we should rename since the signatures and return values differ) is
 an object with {{{__toString()}}}, and each of the {{{$usedParams}}} is a
 reference to the respective chunk in that object. Then, a
 {{{rawurlencode}}} call can be made afterwards. Also, a chunk could be
 some {{{AgaviLiteralRoutingFragment}}} or such object, which do not get
 encoded.

 That would even, more or less, maintain BC.

 Oh and... the {{{array('AgaviToolkit', 'isNotArray')}}} callback to
 {{{array_filter}}} is horribly slow; {{{is_numeric}}} does the job ~5
 times faster, but is not the same thing of course.

 The goal for this routing refactoring should also be that we can allow
 passing arrays and objects as routing gen args.

-- 
Ticket URL: <http://trac.agavi.org/ticket/448#comment:1>
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