简体   繁体   中英

Lithium PHP Framework - CLI generators and naming conventions

I need some guidance on Lithium Framework:

  1. Is there any code generators? Eg CLI model generator? Is there any documentation on this topic?
  2. 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.
  3. 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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM