MongoDB in Kohana 3
I wrote a Mongo_Model to use inside kohana and felt pretty snappy about it until I tried getting anything working with it. The problem is the Kohana's Model class does many things for me that I don't want it to, such as creating a default database (and thus crashes my app). So how do I go about truly implementing my mongo model in Kohana? How do I disable the default database and Just use my model to handle everything with mongo? or the other way around, how do I change kohana's code to acknowledge me using mongo? I just don't want to stick my fingers where they don't belong (e.g. Kohana's system folder) and I w开发者_C百科ant this to be as clean as possible. Any suggestions?
Thank you!
You don't have to extend the Model class from your Mongo_Model class. The base model class is there in case you wish to use Kohana's database library.
There is a project for Kohana that implements MongoDB: https://github.com/colinmollenhour/mongodb-php-odm
精彩评论