Conventions are useful. Not only they allow the code to be clean and consistent, but they also allow a lot of automation.
Diem follows all symfony conventions, and adds some.
When naming something in the code ( a model, a module, a variable, a method... ), there are three ways to do it:
Lowercase, words separated by an underscore.
this_is_an_underscored_word
When use the underscore syntax ?
Uppercased first letter, words separated by an uppercased letter.
ThisIsAnUppercasedWord
When use the camelized syntax ?
Lowercased first letter, words separated by an uppercased letter.
thisIsAModulizedWord
When use the modulized syntax ?
Diem provides methods to transform a string from a syntax to another one.
dmString::underscore($string) // transform $string to underscored syntax dmString::camelize($string) // transform $string to camelized syntax dmString::modulize($string) // transform $string to modulized syntax
The symfony coding stadarts are applied and recommended, without any addition.
Learn about symfony coding standarts
Questions and Feedback
If you need support or have a technical question, you can