colinmollenhour / mongodb-php-odm

A simple but powerful set of wrappers for using MongoDb in PHP (also a Kohana 3 module)
BSD 3-Clause "New" or "Revised" License
208 stars 50 forks source link

Mongo_Document::get_collection_name #9

Closed paulchubatyy closed 13 years ago

paulchubatyy commented 13 years ago

Added the get_collection_name method, that will generate the collection name so that it could be easily redefined in child classes.

Also, this module now proposes the following structure:

- model
--user/collection.php
--user.php
--someother/collection.php
--someother.php

I prefer the following structure:

- model
--collection
---user.php
---someother.php
--user.php
--someother.php

So basically all I need to do is to change the method. Adds a lot of flexibility, almost without overhead.

sebicas commented 13 years ago

Good point Xobb, I think is a very good idea.

paulchubatyy commented 13 years ago

Changed the method name to be named appropriately.