Functions in MY_Controller |
[eluser]bleu[/eluser]
I have MY_Controller which is then used by other controllers. I have Various functions in MY_Controller . How would I declare them? They surely won't be Code: public function function_name{} will they just be Code: function function_name{}
[eluser]PhilTem[/eluser]
Code: function function_name{} if you're using PHP > 5.0 (I think it was introduced within 5.0, but maybe later, something like 5.3). I usually declare functions public or protected. Depending on if they're public functions (uri functions) or non-uri functions. You should definitely read [urlhttp://php.net/manual/en/language.oop5.visibility.php[/url] for general thoughts about function visibility.
[eluser]jellysandwich[/eluser]
http://ellislab.com/codeigniter/user-gui...ml#private |
Welcome Guest, Not a member yet? Register Sign In |