Archive

Archive for November 12, 2008

PHP Refactoring - Lez. 3: Methods of a class

2 commenti November 12, 2008 Nicholas 2 comments

As regards the methods of a class, also applies in this case the naming convention previously exposed to the properties of the class itself. We repeat them below for convenience:

  • If consists of a single word, all lowercase, for example, currency ();
  • If made ​​of many words the first letter of each, starting from the second, in uppercase, all lowercase other, for example, addElement ();
  • The method name should be self explanatory.

Continue reading ...