Naming a model class |
[eluser]mattalexx[/eluser]
In the docs, it mentions this: Code: class Blogmodel extends Model {} Code: class User_model extends Model {} Code: class Item_Image_model extends Model {} Code: class Item_image_model extends Model {} Code: class ItemImage_model extends Model {} Code: class ItemImageModel extends Model {}
[eluser]EEssam[/eluser]
I was confused as well then I decided to use "User_model".
[eluser]sikkle[/eluser]
i usually keep it clear like : User_model Good luck !
[eluser]Colin Williams[/eluser]
Just choose the style you prefer and stick with it throughout your application. I particularly like underscores and dispise camelCase, but to each his own.
[eluser]mattalexx[/eluser]
[quote author="Colin Williams" date="1214216761"]Just choose the style you prefer and stick with it throughout your application. I particularly like underscores and dispise camelCase, but to each his own.[/quote] This new piece of the user guide explains what I was trying to figure out: http://ellislab.com/codeigniter/user-gui...hod_naming
[eluser]Adam Griffiths[/eluser]
[quote author="mattalexx" date="1225417325"][quote author="Colin Williams" date="1214216761"]Just choose the style you prefer and stick with it throughout your application. I particularly like underscores and dispise camelCase, but to each his own.[/quote] This new piece of the user guide explains what I was trying to figure out: http://ellislab.com/codeigniter/user-gui...hod_naming[/quote] And just as I was going to say to user _ rather than camel case, because CI does it all that way, and it says so in the user guide!! |
Welcome Guest, Not a member yet? Register Sign In |