我为 Doctrine 创建了 yaml 配置。当我尝试时 doctrine orm:generate-entities
,它在 Camel 案例中创建带有 getter 和 setter 的 php 文件。所以,is_public
字段转换为 setIsPublic
和 getIsPublic
方法。太亏了我怎样才能得到set_is_public
和 get_is_public
?我可以手动编辑生成的 php 文件,但是我不知道更改架构后会发生什么。
最佳答案
Symfony's coding standards鼓励 Symfony 用户使用 Camel 箱 :
Naming Conventions
Use camelCase, not underscores, for variable, function and method names, arguments
关于doctrine-orm - Doctrine 2 ORM 使用可恶的 CamelCase 创建类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7573694/