Welcome Guest, Not a member yet? Register   Sign In
connection of standart classes to codeigniter
#1

[eluser]Unknown[/eluser]
In my app I use mongoDb as default back-end storage
so in php the next code is avaible
Code:
$mongo=new Mongo();
$db=$mongo->database_name;
$collection=$db->collection_name;
and so on..
And here is the question:may i in any way add an object of Mongo class to CI object to have such such access
Code:
$this->mongo->database_name;
sure i can write wrapper for thic class. But it's driver and code is so well written, that there is no reason to do this.
It'll be greate if this code will be available by autoload.

P.S. sorry for my bad eng) and.. i didn't wrote any big applications in CI, so my experience is not so large.. if this is nooby question - just give me a link) thanks
P.P.S. surely I can write some kind of such code
Code:
class mongo extends Mongo{}
but it seems to be some kind of hack




Theme © iAndrew 2016 - Forum software by © MyBB