Welcome Guest, Not a member yet? Register   Sign In
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.

Theme © iAndrew 2016 - Forum software by © MyBB