• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Creating your own database library

Quality concerns aside, if i wanted to use my own database library, where would i put it. The database library seems to be firmly embedded into the ci core, so replacing it looks a bit tough.

Any ideas?

I wont do that if I were you.
But anyway,put your library in the system/application/library folder. I think you have to do some hooks to override CI.

From user guide:

Note: The Database classes can not be extended or replaced with your own classes, nor can the Loader class in PHP 4. All other classes are able to be replaced/extended.

So, only thing that remains is to re-write existing CI DB classes :-)

Good luck with that Tongue


[eluser]Philipp Gérard[/eluser]
There's no reason your database library has to be called 'Database', just name it Mongod, Msqld or whatever you want to use. I would not rewrite the core class, upgrading the underlying CI will be a pain.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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