Welcome Guest, Not a member yet? Register   Sign In
Is adding functions to CI_Controller bad practice?
#2

[eluser]skunkbad[/eluser]
[quote author="coldscooter" date="1332968903"]I have a function that I wish to be available to all controllers.

Should I simply add this function to the CI_Controller class?[/quote]

No, you should extend the CI_Controller class with a MY_Controller class. Then all of your controllers will extend MY_Controller instead of CI_Controller.


Messages In This Thread
Is adding functions to CI_Controller bad practice? - by El Forum - 03-28-2012, 02:08 PM
Is adding functions to CI_Controller bad practice? - by El Forum - 03-28-2012, 02:14 PM
Is adding functions to CI_Controller bad practice? - by El Forum - 03-28-2012, 02:17 PM
Is adding functions to CI_Controller bad practice? - by El Forum - 03-28-2012, 02:18 PM
Is adding functions to CI_Controller bad practice? - by El Forum - 03-28-2012, 02:20 PM
Is adding functions to CI_Controller bad practice? - by El Forum - 03-28-2012, 02:39 PM
Is adding functions to CI_Controller bad practice? - by El Forum - 03-28-2012, 02:43 PM
Is adding functions to CI_Controller bad practice? - by El Forum - 03-28-2012, 03:06 PM



Theme © iAndrew 2016 - Forum software by © MyBB