![]() |
multiple MY_Controller? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: multiple MY_Controller? (/showthread.php?tid=28503) |
multiple MY_Controller? - El Forum - 03-12-2010 [eluser]upstream[/eluser] Hi Guys, is it possible to have multiple MY_Controller? or rather multiple extention of MY_Controller? if so, how? Like for example. i need to extend the Controller for Admin Pages, and again, extend it for Members Pages. If this is not possible, is there any better solution for this problem? thanks!!! multiple MY_Controller? - El Forum - 03-12-2010 [eluser]tomcode[/eluser] Yes and No, No, You can have only one file MY_Controller.php. But, You can define several classes inside this file : Code: // For all common methods multiple MY_Controller? - El Forum - 03-13-2010 [eluser]upstream[/eluser] i see, that's what i currently did. that is also applicable to other like form validations, correct? thank you tomcode! multiple MY_Controller? - El Forum - 03-13-2010 [eluser]tomcode[/eluser] Sure, but I usually work rather with models and librairies than with multiple base controllers, up to You, what You like best. |