[Solar-talk] router help needed
Rodrigo Moraes
rodrigo.moraes at gmail.com
Sat Nov 11 04:32:58 PST 2006
Paul and everybody,
I'm in doubt about the way to set the uri $specs in the url router, to
return to the front controller.
The concept is simple:
$front = Solar::factory('Solar_Controller_Front');
$router = Solar::factory('Tipos_Controller_Router');
$front->display($router->route());
Basically, $router->route() checks for a route that matches the
current url path and "rebuilds" the path in a way that Solar
understands (e.g., 'bookmarks/user/pmjones/php+blog?page=2').
Do you think that rebuilding the path passed to $front->display() is a
good idea?
I would like to know if there are plans to take a completely different
approach for url mappings in Solar than one similar to ZF's
RewriteRouter, which is also borrowed from Rails (routes definitions
with defaults and requirements, allowing wildcards and keywords).
I've already done a default route and another one that extracts and
matches subdomains. :-)
The code is much improved and simplified now, and also has much more
comments than the original. But I would like so much to have some
feedback or to hear the plans for Solar in this area.
rodrigo
---------------------------------------------------------------------
Solar has now a Community Wiki: solarphp.org
---------------------------------------------------------------------
Join the #solarphp IRC channel on freenode.org
---------------------------------------------------------------------
More information about the solar-talk
mailing list