PHP - Class Files

  • As noted in the section outlining Comments & External Documentation, each file should begin with a block comment detailing important information about the file. In addition to the default block comment, the class should include PHPDoc comments sufficient to produce a full API for the given class and/or package.
  • Constants should be defined at the beginning of the file.
  • Any included files should be included after declaring constants.
  • Constructors, destructors, and other “magic methods”1) that are modified or enhanced should be declared at the beginning of a class.
  • It should be noted that any HTML produced by a PHP class should adhere to the HTML standards.
1) A further explanation of “Magic Methods” can be found at http://www.php.net/manual/en/language.oop5.magic.php
 
programming\php\class_files · Last modified: 2008/01/22 18:06 by admin
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki