Welcome Guest, Not a member yet? Register   Sign In
private controller function from model
#1

[eluser]Fenix[/eluser]
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?
#2

[eluser]Dam1an[/eluser]
The more information (such as what code you have so far etc), the more people can help you Wink
#3

[eluser]Fenix[/eluser]
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):
Code:
private function _errorOut($error_code)

The way I use it in my controller:
Code:
$this->_errorOut(1004);

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




Theme © iAndrew 2016 - Forum software by © MyBB