'Twas brillig, and Taha Bayrak at 22/12/09 06:23 did gyre and gimble: > What is the best practice for placing the base controller classes?
Ideally, don't use them at all. You can use action helpers to group up common tasks into one handy call... You can also have plugins work at the dispatch loop level which can be handy. Sometimes it just feels nicer to have a base class tho'. > a. Placing them in the same directory as the other controllers - the > ones that extends from the base class -? If so, is there a easy way to > prevent the base class getting into the dispatch loop? Just prefix the class with the word "abstract"... i.e. abstract class MyBase_Controller { .... } That way the class cannot be instantiated on it's own. It may be a nasty crash tho'. Personally I'd put it in a subdirectory of the Controller folder to make sure. Col. -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hacker [http://trac.edgewall.org/]