2008年8月22日星期五

[fw-mvc] Virtual Controllers

I'm currently working on several different migration projects into the new
framework, and am having some difficulty wrapping my brain around this
specific functionality.

We have several orphaned html files which need to be reassessed, regrouped,
and reworked ( within various projects ) . I'd like to implement a simple
CMS type functionality which could do the following, for instance:

Page: Ask us a question ( interpreting into module/department/ask/index for
mapping ).

The page itself will be moved to the DB, leaving me with a unique identifier
of department/ask/index to query against. My thought process includes:

1.) Using __call to create a virtual action handler to process the request
as if it were a true action within a controller ( i.e. indexAction within
askController ).

2.) Mapping all requests to a core controller for processing ( so that way I
can create a virtual AskController without running into a conflict over file
not found ).

3.) Create a router to handle various requests.

Sorry if the description isn't explicity detailed, but this is about as far
as Ive gotten. My problem is, I don't want to have all my requests get
ported through a core controller which then forwards along. There are
several controllers already implemented that shouldnt need to be first
handled by a main controller due to this virtual theory.

My best idea would be through routing, however the db-pages are dynamic in
all nature. I won't have a standard identifier to perform a regex expression
against, and Id prefer not to create a new router for each page being stored
within the database.

Once again, I apologize if this posting is a bit back and forth, but that's
just how I feel at the moment. Anyone have any ideas?
--
View this message in context: http://www.nabble.com/Virtual-Controllers-tp19118385p19118385.html
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: