-- 7eicher <[EMAIL PROTECTED]> wrote
(on Tuesday, 16 October 2007, 01:23 AM -0700):
> A) i dont know if the method of multiple dispatches can handle all the
> possible front controller plugins? 

Please look at the chapter on 'Zend_Controller Basics', which outlines
how the dispatch process works:

    http://framework.zend.com/manual/en/zend.controller.basics.html

In there, you will see that once inside the dispatch loop, the
preDispatch() and postDispatch() plugins are called before and after
each action, respectively. The other plugins trigger at their
appropriate times before and after the dispatch loop.

So, while you wouldn't be triggering all plugins on each iteration of
the loop, those preceding the dispatch loop will have already been
triggered -- meaning if you create your ACL list early, you need only
check each action against it in preDispatch().

> and what would happen if someone uses a _forward in a controller? does
> this have any side effects?

I would suggest that any postDispatch() plugin you write for handling a
request stack would first check to see if there's already a forward
request. This is trivial to do:
    
    if ($this->getRequest()->isDispatched()) {
        // _forward() detected
        return;
    }
    // now process our request stack...

> B) by the way, is it neccessary in the enhanced view proposal to inject data
> in the called view, or can i overwrite the view data of the native
> controller with my own data?

I'm not sure I understand the question. 


> what i like in the idea of having multiple instance is the context free ask
> for content. for example i have to check the acl's of my user and modules
> and i proof translate gettext files before dispatching in allready written
> front controller plugins. i also like the php virtual() function.
> unfortunately it dont work with sessions(i guess). 
> 
> the idea is pretty good, but off course it has some footprints! once i was
> programming in lisp and it has a lot of charme, because it realises
> programming without side effects.
> 
> cheers
> markus
> 
> 
> Matthew Weier O'Phinney-3 wrote:
> > 
> > -- Parnell <[EMAIL PROTECTED]> wrote
> > (on Monday, 15 October 2007, 07:38 AM -0600):
> >> I would imagine the footprint from running multiple front controllers
> >> would be pretty big!
> >> 
> >> The idea is interesting though, I wonder if it would be more useful with
> >> a lighter front controller (such as Picora).
> > 
> > As I've written in another response to this thread, I'm not convinced
> > multiple instances are even required; with the dispatch loop available,
> > a plugin that simply handles a request stack would likely achieve the
> > same functionality.
> > 
> > -- 
> > Matthew Weier O'Phinney
> > PHP Developer            | [EMAIL PROTECTED]
> > Zend - The PHP Company   | http://www.zend.com/
> > 
> > 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/chaining-the-front-controller-tf4625668s16154.html#a13228825
> Sent from the Zend Framework mailing list archive at Nabble.com.
> 

-- 
Matthew Weier O'Phinney
PHP Developer            | [EMAIL PROTECTED]
Zend - The PHP Company   | http://www.zend.com/

Reply via email to