【发布时间】:2011-06-06 08:15:06
【问题描述】:
如何防止在 foo 类中创建下面的something 方法?
class fooBase{
public function something(){
}
}
class foo extends fooBase{
public function __construct(){
echo $this->something(); // <- should be the parent class method
}
public function something(){
// this method should not be allowed to be created
}
}
【问题讨论】: