【问题标题】:Turn off CamelCase for class names in cakephp 2.x [closed]在 cakephp 2.x 中为类名关闭 CamelCase [关闭]
【发布时间】:2014-03-04 11:29:20
【问题描述】:

在 cakephp2.2 中,类名是否必须用 CamelCase 编写,例如 Exam2014。有没有办法获得像exam2014这样的输出。

【问题讨论】:

  • I want it like 'exam2014' => 为什么?很高兴你发现了你的问题。现在剩下的就是你遵循约定。这个问题在 IMO 中是不必要的。

标签: cakephp controller


【解决方案1】:

我刚刚在http://google.com 中输入了why do controller names in cakephp start with a capital?,然后弹出的第一个链接是http://book.cakephp.org/2.0/en/contributing/cakephp-coding-conventions.html

摘录如下:

课程
类名应以驼峰形式书写,例如:
class ExampleClass { }

我相信这是你的答案。您可以在我为您提供的链接上阅读更多内容。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-12-31
    • 2022-07-08
    • 2011-07-29
    • 1970-01-01
    • 2018-08-29
    • 1970-01-01
    • 1970-01-01
    • 2014-01-08
    相关资源
    最近更新 更多