Welcome Guest, Not a member yet? Register   Sign In
Creating your own database library
#1

[eluser]richzilla[/eluser]
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?
#2

[eluser]keithics[/eluser]
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.
#3

[eluser]smilie[/eluser]
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

Cheers,
Smilie
#4

[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.




Theme © iAndrew 2016 - Forum software by © MyBB