【发布时间】:2009-04-12 17:45:11
【问题描述】:
你好,我想在课堂上做点什么
我想做一个超类,我的所有类都在它上面扩展
____ database class
/
chesterx _/______ member class
\
\_____ another class
我想像这样调用数据库类中的方法
$this->database->smtelse();
class Hello extends Chesterx{
public function ornekFunc(){
$this->database->getQuery('popularNews');
$this->member->lastRegistered();
}
}
当我将我的超类扩展到任何类时,我想用它的父类名调用一个方法
【问题讨论】: