Closed sorcererlc closed 11 years ago
Why not just set Mongo_Database::$default = Kohana::$environment in your bootstrap? I think this is better as it keeps the module more generic (not tied directly to Kohana or to any specific version of Kohana).
You are correct, this is a better way if you want to keep the module as generic as possible.
I usually write my modules with deep Kohana integration and i try to make things as automated as possible. In this case, may i suggest setting up a separate branch for a more Kohana-integrated version of the module?
I've not used Kohana in years so honestly I don't want to invest any time into it.
I understand. You should take a look at the latest version. A lot of things have changed/improved in the last two or so years :)
Added all Kohana environments to config file. Updated Collection and Document classes to instantiate Database class using current Kohana environment.
Should make it easier to use in multi-environment applications.