Moa*_*oak 7 php zend-framework naming-conventions traits
在Zend Framework项目中使用traits的命名约定是什么?
My_Form_Element_Traits还是My_Form_Element_Trait?
我在想复数,因为它是方法和属性的集合,但另一方面它是一个特征.
我也想过,也许我想要使用不同的特性,所以也许它应该是 My_Form_Element_Traits_Preference
听到这个新功能的最佳做法是什么?
您可能对PHP-FIG使用的约定感兴趣: https://github.com/php-fig/fig-standards/blob/master/bylaws/009-naming-conventions.md
在我看来,即使你使用ZF1,你也不应该遵循这个约定。我推荐你使用PSR-2