CodeIgniter Forums
Extending Session Library in Codeigniter 3.1.8 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11)
+--- Thread: Extending Session Library in Codeigniter 3.1.8 (/showthread.php?tid=73674)



Extending Session Library in Codeigniter 3.1.8 - larrycodes - 05-21-2019

Hello every one, I have worked with codeigniter for a while now and currency developing an application in the same.
I always find it easy to extend some built in libraries, the email class for instance, but never have I been faced with a situation where I need to extend the session library. Here is the thing, my email sub-class works fine and I have all the extended functionality that I have added, however, when I try extending the session library, it seems my sub-class is not used. It seems codeigniter still loads the in-built session library.

I have searched allover for how to fix this, but I don't seem to get a solution. Anyone with an idea of how to go about this?
Thanks in advance.


RE: Extending Session Library in Codeigniter 3.1.8 - php_rocs - 05-21-2019

@larrycodes,

Any chance on you upgrading to current version of CI? Also, is it possible to see code in order to see how you extended the class and where was it used?


RE: Extending Session Library in Codeigniter 3.1.8 - larrycodes - 05-21-2019

Thanks @php_rocs,

I figured it out, turns out since the Session library was moved and is in a subfolder, I needed to also create a subfolder in the Session in the libraries directory and there in extend the Session library.