Page 1 of 1

Kohana/CodeIgniter Question

Posted: Thu Sep 03, 2009 12:23 pm
by volomike
Both Kohana and CodeIgniter, and a few other PHP MVC frameworks, require that we subclass a controller class before we get started. I guess they assume I might want to use more than the index() function of a controller class. My question to you is why do they do this? I mean, can't we have an MVC framework that just lets me create a new folder path and file in my controllers folder, and just start typing code without having to do the class declaration every time, especially if I'm only going to have one controller method in there, anyway (index())?

And if that's not possible, then has anyone figured out a shortcut I can stick in my class so that I don't need to subclass the controller class every time?