Wouterrr edited this page Sep 13, 2010 · 11 revisions
Clone this wiki locally

What’s what?!

This is a module for version 3 of the Kohana PHP Framework.


Ask your questions on the Kohana Forum, I’ll read it http://forum.kohanaphp.com/comments.php?DiscussionID=2968


Mango is an ORM/ActiveRecord like library that takes full advantage of MongoDB’s features. Mango supports:

  • Atomic updates – the library will calculate what values changed, and will update only those values using atomic modifiers like $set, $push/$pull and $inc
  • All Mongo datatypes including embedded objects, arrays, enums and (multidimensional) counters
  • Relationships you remember from the RDBMS world like has_one, belongs_to, has_many and has_and_belongs_to_many
  • Validation of object data, including embedded objects
  • Class Table Extension-like behavior – eg Model_Ferrari extends Model_Car extends Mango.
  • Very easy syntax very familiar to users of KO3 Sprig and Kohana ORM

Mango comes with many code examples – see my other module MangoDemo


A simple wrapper to access MongoDB. Store your database info in a config file and access MongoDB from anywhere in your code using MangoDB::instance().


Want to implement a queue in MongoDB? Make sure you check out my MangoQueue module.