[eluser]Unknown[/eluser]
Sorry for the major bump but.
Greg said that the MY_class should be in core not libraries. This is incorrect as far as my testing goes.
My case:
Version: 2.0
Extending CI_Session
Location: application/libraries/MY_Session.php
Definition:
Code:
class MY_Session extends CI_Session {
public function __construct($params = array())
{
var_dump('yay!');
die();
}
}
Effectively replaces the constructor of CI_Session
Locating the same file under application/core fails to do so.
PS
I am also trying to replace CI_Model but haven't been successful at it. I will make a post about it if search on the forum results in no help.
-Edit-
only applicable to CI 2.0
CI_Session is located in system/libraries, hence MY_Session makes sense to be in application/libraries.
Made MY_Model work by locating the file in application/core. CI_Model resides in system/core so it makes sense to be in application/core.
The only other change you need to do is change your models (in application/models) to extend MY_Model not CI_Model. And if your model construct functions still contain the following:
change it to:
Code:
parent::__construct();
Location: application/core/MY_Model.php
Definition:
Code:
class MY_Model extends CI_Model
{
function __construct()
{
var_dump('yay2!');
die();
}
}