Lithium PHP Framework - CLI generators and naming conventions
I need some guidance on Lithium Framework:
开发者_StackOverflow中文版- Is there any code generators? E.g. CLI model generator? Is there any documentation on this topic?
- What are naming conventions for models? Some tutorials and pieces of documentation say that a name should be plural but in "manual\working-with-data\relationships.wiki" names are singular.
- How to name transitional tables (models)? "Posts", "Tags" and ... PostTags?
Thank you in advance!
Lithium has a cli tool. It's called 'li3' and you can find it under the lithium/console directory. It creates models, views, tests, and what not. As for naming your models and tables, plural names are the convention. Posts, Tags, and PostTags as you mentioned -- although there is no HABTM support in li3.
You should checkout the manual available at http://li3.me/docs/manual. It's official documentation source, and is based off the more up-to-date li3 manual repository at https://github.com/UnionOfRAD/manual.
精彩评论