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

Method Naming Conventions #56

Closed teaqu closed 10 years ago

teaqu commented 11 years ago

We have methods like: command_safe get_auto_increment set_collection_class

but we also have methods like: getName getGridFS selectCollection

We should stick with one way to name the methods. I think we should use under_score naming, not camelCase naming since that's how it's done in Kohana.

colinmollenhour commented 11 years ago

I will concede that there are many inconsistencies, mainly due to originally being developed for Kohana while also trying to stick with the Mongo driver convention. Anyway, I don't want to break backwards compatibility but if I did I would go with PSR-1 which is camelCase..