I want to create my own class in an existing CodeIgniter project.
I will create an object (say Object1) from that class in a controller (based on the user ID). This object will retrieve data in DB to populate its variables.
I want to be able to use this object in any function of my controller, and if possible I want to transmit it to my views.
In a near future, I might add another object (say Object2) that would contain several Object1.
What’s the proper way to do it ? I started to write it in a model but it seems unapropriate ..
In case anyone’s interested, I ended up using a normal php file that i store in /classes/.