是否有人能够详细解释Symfony *用来命名目录结构中文件夹和文件的标准?Symfony文件夹结构标准
MyBundle
├─ Controller/ <-- 1) why singular?
├─ Model/ <-- 2) why singular?
├─ Resources/ <-- 3) why plural?
│ ├─ config/ <-- 4) why the "c" is lowercase?
│ ├─ translations/
│ ├─ views/ <-- 5) why the "v" is lowercase and views is plural?
│ │ └─ Default/ <-- 6) Why uppercase?
│ │ └─ my_view.html.twig <-- 7) Why lowercase and snake case?
│ └─ public/
├─ Service/ <-- 8) why singular?
└─ Tests/
这就引出了另一个问题:如果我想创建一个包含模型文件夹内ArchiveSection
类的文件夹,我应该如何命名呢?
- 型号/ ArchiveSections/
- 型号/ ArchiveSection/
- 型号/ archive_sections/
谢谢你!
*我正在使用Symfony 2.3。
对于小写字母,我猜它意味着一个不包含类的文件夹。至于复数和'默认',好的问题。 – Twifty