• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
private controller function from model

I have an error function in my controller that sets the respective http status header, outputs the error, and exits. I'd like to be able to call this from my model.

I guess this is more just a general OO PHP syntax question, but, how can this be done?

The more information (such as what code you have so far etc), the more people can help you Wink

The function (what exactly it does is irrelevant, I just want to know how to call it from a model which I load from the controller):
private function _errorOut($error_code)

The way I use it in my controller:

I can't call it this way from my model because the function isn't located there.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.