Hello,
I'm trying to extent a controller in order to separate my actions in separate files (I hate files with 10k lines) .
Here is what I'm trying to do:
Instead of
File: app/controllers/DataController.php
class DataController extends Controller
{
public function indexAction(){
/* Some stuff */
}
/*......*/
public function magicAction(){
/* Some other stuff */
}
}
I want to be able to do this
File: app/controllers/DataController.php
class DataController extends Controller
{
public function indexAction(){
/* Some stuff */
}
}
File: app/controllers/DataController/MagicAction.php
class MagicAction extends DataController
{
public function magicAction(){
/* Some other stuff */
}
}
How can I make that happen? Am I doing it the right way? If not what's the best way to do it?
Thanks in advance :)