• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Q] how can I quicly determine if a given CI library is loaded

#1
[eluser]vlad_ci[/eluser]
I want to programmatically detect if a given CI library
is already loaded and if not loaded, load it.

Is this something I should do, or simply attempt to load it
and CI will figure out internally that it was already loaded

?

thank you

#2
[eluser]Randy Casburn[/eluser]
Use the php function class_exists('class'); If it has been defined it will tell you.

Randy

#3
[eluser]vlad_ci[/eluser]
thank you.

I also put a test printout in the constructor of the library
and I am seeing that the constructor being called only once,
so may be, by design I can load it as many times as I want

but CI will keep only the first version
(and the first set of arguments passed in)


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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