[Tickets #7197] Use Horde_Routes in jonah/delivery/index.php
bugs at horde.org
bugs at horde.org
Wed Aug 13 04:59:44 UTC 2008
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/7197
------------------------------------------------------------------------------
Ticket | 7197
Created By | Chuck Hagenbuch <chuck at horde.org>
Summary | Use Horde_Routes in jonah/delivery/index.php
Queue | Jonah
Type | Enhancement
State | Assigned
Priority | 1. Low
Milestone |
Patch |
Owners | Ben Klang
------------------------------------------------------------------------------
Chuck Hagenbuch <chuck at horde.org> (2008-08-13 00:59) wrote:
Here's some example routes code:
$m = new Horde_Routes_Mapper();
$m->connect(':controller/:action/:id');
$m->connect('/admin/:section/:page', array(
'controller' => 'admin',
'section' => '',
'page' => '',
));
$m->connect('/minutes/:date', array(
'controller' => 'minutes',
'date' => '',
'requirements' => array('date' => '\d{4}\-?\d{2}\-?\d{2}'),
));
$m->connect('/page/:page', array(
'controller' => 'pages',
'requirements' => array('page' => '\w+'),
));
$result = $m->routematch($_SERVER['REQUEST_URI']);
if (!is_null($result)) {
list($vars, $route) = $result;
switch ($vars['controller']) {
}
Ben: I'm assigning this to you so you can write out the URL rules that
should be matched here (to make sure I get the intent right instead of
just looking at that switch statement). If you want to pass this off
afterward that's fine.
More information about the bugs
mailing list