View Single Post
  #2 (permalink)  
Old 04-18-2008, 01:44 PM
Elemental's Avatar
Elemental Elemental is offline
Senior Member
 
Join Date: Jul 2007
Posts: 119
Default

Yes the init() funciton is run for every request against the controller, so you run three actions from that controller during the request init() will run three times. __construct() runs only once and preDispatch() plugins will only run once as well I believe. init() is run per action call to facilitate tailoring the controller initialization for the action being requested. Its not a bug. If you create a endless loop with forward calls then YOU have created the logical error condition. To call an action without running init() you do $this->testAction(); A controller is still an object and can be used as one as long as your action definitions don't muck it up.

I don't think you can really get parallel execution out of Apache on *nix or *dows but I'm not sure about that.
__________________
Zend Framework Resources: Zend Webinars | Reference Manual | API Docs | Books | FreeNode: #zftalk
Getting Started Tutorials: Getting started with ZF | Getting started with Zend Auth
Reply With Quote