经测试代码如下:
<?PHP
/**
* 通用类
*
* @param
* @arrange (512.笔记) jb51.cc
**/
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
}
}
/*** 代码来自编程之家 jb51.cc(jb51.cc) ***/
原文链接:https://www.f2er.com/php/528837.html