-- Jaka Jančar <[EMAIL PROTECTED]> wrote (on Tuesday, 30 September 2008, 08:51 AM +0200): > How can I call one controller's action from another controller? > > I don't want to add it to the action stack, but instead obtain the > return value immediately. > > Instantiating a controller seems to mess up my action handlers > (ViewRenderer especially, I think). Before I start looking into this in > more detail, is invoking a controller action/instance method from > another controller supported at all?
You're thinking about the problem incorrectly. If you need to execute a method from another controller, you probably should be moving the part you need to execute into a model. Then you need simply call the model. Additionally, action methods should not be returning values anyways. If you're calling a non-action method, you might want to consider moving that functionality to an action *helper* so you can re-use it easily. -- Matthew Weier O'Phinney Software Architect | [EMAIL PROTECTED] Zend Framework | http://framework.zend.com/
