简体   繁体   English

Lithium PHP Framework - CLI生成器和命名约定

[英]Lithium PHP Framework - CLI generators and naming conventions

I need some guidance on Lithium Framework: 我需要一些有关Lithium Framework的指导:

  1. Is there any code generators? 有代码生成器吗? Eg CLI model generator? 例如CLI模型生成器? 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. 一些教程和文档片段说明名称应该是复数,但在“manual \\ working-with-data \\ relationships.wiki”中,名称是单数。
  3. How to name transitional tables (models)? 如何命名过渡表(模型)? "Posts", "Tags" and ... PostTags? “帖子”,“标签”和...帖子标签?

Thank you in advance! 先感谢您!

Lithium has a cli tool. 锂有一个cli工具。 It's called 'li3' and you can find it under the lithium/console directory. 它被称为'li3',你可以在锂/ console目录下找到它。 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. 你提到的帖子,标签和帖子标签 - 尽管li3中没有HABTM支持。

You should checkout the manual available at http://li3.me/docs/manual . 您应该查看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 . 它是官方文档源,基于https://github.com/UnionOfRAD/manual上最新的li3手册存储库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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