• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to use one codeigniter instance across multiple libraries

Hi guys,

I am working on a large codeigniter affiliate system application. This application is requiring me to me to use multiple custom libraries which extend from a main class.

for example

class Click extends Tracking {

class Click_Commissions extends Click {

At the moment I am creating a ci instance in the construct of each class however as I sometimes load multiple libraries from inside one library I end up with quite a few ci instances...does anybody have any idea what the best way to use one ci instance would be instead of calling the instance multiple times?



Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.