Or I can also create UserController/AdminController as a
factory class
for creating subcontrollers (from user/ and admin/
directories
respectively), its cheat a bit, but could work. I didnt see
this
rewrite-router in work, maybe it could handle situations
like this?
On 30/07/06, Christopher Thompson <cxthompson charter.net> wrote:
> I have a proposal to allow Actions to be put in
sub-directories. I think
> there has been some work elsewhere to make this happen
as well. You
> could have URLs like user_signin/, admin_users/ that
would reference
> controllers in the user and admin directories within
the controller
> directory.
>
>
> Laszlo Horvath wrote:
> > Hi all,
> >
> > Problem: I have /, user/, admin/ main routes in
my system. For / the
> > current router is perfect, but I would like to
have directory layout
> > like:
> > /app
> > /controller
> > /user/ (multiple user related
controllers in
> > directory)
> > /admin/ (multiple admin
related controllers in
> > directory)
> > IndexController.php and others
for public
> >
> > other parts would be much like default layout
> >
> > Reason: If user or admin area have big number of
actions, it will
> > become a very large and hardly maintanable piece
of code (and in such
> > areas there always is a lot of them).
> >
> > Solution??: I tried to implement
Zend_Controller_Router_Interface,
> > with a new router but I cant call
setControllerDirectory() from there,
> > its part of Front_Controller, which would solve my
problems and make
> > my objects instantiate correctly.
> >
> > How do you implement this? Dont mind about 1000+
lines in UserController?
> >
> > and a bit offtopic: I would make
setControllerDirectory() accept array
> > of directories.
> >
> > Thanks in advance for your ideas, suggestions
> >
>
|