views:

41

answers:

1

Zend framework: what is the significance of controller filenames that have "init" in them? I have 3 files that seems to have exactly the same code, named:

TestController_init.php TestController.init.php TestController.php

?

A: 

In my opinion you should have onlu one TestController.php that contains all behaviours that this controller should have (init() method, etc).

Could you pase the content of 2 other files ?

hsz
pase? they have a lot of code in them but it's well possible they are not being used at all. cant talk to the original developer to find out. assuming I just need the file without init.
stef
I mean 'paste'.However I never met `*Controller_init.php` or `*Controller.init.php` convenction. I'm sure that it is only this developer own idea to separate some controller initializations and controller's proper action methods.You should look into bootstrap, `Controller_Action`, `Frontcontroller` layers for calling init files.
hsz
Cool, thanks. Too much code to paste :)
stef
I guess you got some "DIY" code. Zend never had controller files with init in them.
Tomáš Fejfar