[eluser]Unknown[/eluser]
Hi everybody.
I have an controller class
Code:
class User extends MY_Controller
{
private $_model;
function __constructor()
{
parent::MY_Controller();
$this->_model = $this->load->model('user_model');
echo "this text will be never displayed";
}
function index()
{
redirect('start/');
}
function logout()
{
$this->_model->logout();
}
}
Basically I have no idea when constructor of this class is called. I would like to my $_model variable to be visible in whole class.
So the basic question is: When the constructor of controller is called?