一个php通用类代码
<?php require_once('SuperClass.php'); /** * This is a class * * @author Your Name * @copyright Your Copyright info */ class ClassName extends SuperClass { // PUBLIC PROPERTIES -------------------------------------------------------------- /** * This is a public variable * * @author Your Name */ public $publicVar = 'a public variable'; // PRIVATE PROPERTIES ------------------------------------------------------------- /** * This is a private variable * * @author Your Name */ private $privateVar = array(); // MAGIC METHODS ------------------------------------------------------------------ /** * The constructor * * @author Your Name */ public function __construct () { parent::__construct(); } /** * The destructor * * @author Your Name */ public function __destruct () { parent::__destruct(); } // PUBLIC METHODS ----------------------------------------------------------------- /** * This is a public method * * @author Your Name */ public function publicMethod () { // do something } // PRIVATE METHODS ---------------------------------------------------------------- /** * This is a private method * * @author Your Name */ private function privateMethod () { // do something } } ?>