[Tickets #7197] Re: Use Horde_Routes in jonah/delivery/index.php

bugs at horde.org bugs at horde.org
Fri Aug 22 19:06:50 UTC 2008


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/7197
------------------------------------------------------------------------------
  Ticket             | 7197
  Updated By         | Ben Klang <ben at alkaloid.net>
  Summary            | Use Horde_Routes in jonah/delivery/index.php
  Queue              | Jonah
  Type               | Enhancement
  State              | Assigned
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             | Ben Klang
------------------------------------------------------------------------------


Ben Klang <ben at alkaloid.net> (2008-08-22 15:06) wrote:

I've spent some time over the last few days trying to puzzle this  
together to match what I implemented in delivery/index.php.  While  
simple cases seem to map directly I can't seem to figure out how to  
get exactly what I want from Horde_Routes.

For example, it's pretty straightforward to set up routes for  
channel/:channel_id, for story/:story_id or for tags/:tag_id.  What I  
can't figure out, short of using query args, is providing the ability  
to filter based on arbitrary criteria.  Some examples:

/channel/:channel_id/tag/:tag_id
/tag/:tag_id/date/:date
/channel/:channel_id/date/:date

While I don't think it's important to allow mixing the order of  
attributes I do think it's important to allow for any combination of  
valid attributes.  Short of accounting for every possible permutation  
with a route map (which is obviously unmaintainable) I don't see how  
to accomplish this with Routes.  Am I missing something?  All of the  
examples I see are either for direct "controller/action/id" tuples or  
strictly nested attributes such as  
"region/:region_id/location/:location_id/action" where it would never  
make sense to specify a location without a region or vice versa.  The  
Jonah attributes have no relation to the other attributes, except in  
certain cases like it would not result in a sensible combination  
("/story/:story_id/tag/:tag_id" for example).





More information about the bugs mailing list