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.
|