[Solar-talk] request: split the front controller, add a mapper
Rodrigo Moraes
rodrigo.moraes at gmail.com
Fri Nov 3 22:41:34 PST 2006
Hi,
We have talked about this proposal before. Now it is official. :-)
The current Solar_Controller_Front is not very flexible to map a url
to a controller / action. It is simple to add a bit of flexibility to
this: split fetch and add a mapper (or "router") instance defined on
config. The default $config['mapper'] would be
'Solar_Controller_Mapper' (change to your preferred name), and it
would have exactly the current front controller map logic. The method
map() (other names: match(), or route()) would return an array
containing a controller class name and a action name.
Here is a proposal following strictly the current front controller:
http://solarphp.org/wiki/proposals/mapper
Why, if this changes almost nothing? To let people try and propose
other mappers - one that uses placeholders or has different default
fallback, etc.
Thoughts? Other ideas?
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