我有一个实现几个抽象方法的类。当我扩展该类时,我收到以下致命错误消息:
Class CI_Controller_Rest contains 6 abstract methods and must therefore be declared abstract or implement the remaining methods
具有抽象方法的类:
class CI_Controller_Rest extends CI_Controller {
public function __construct() {
parent::__construct();
}
abstract public function index();
abstract public function get();
abstract public function head();
abstract public function post();
abstract public function put();
abstract public function delete();
}
我扩展的类CI_Controller_Rest
:
class Welcome extends CI_Controller_Rest {
public function __construct()
{
parent::__construct();
}
public function index() {}
public function get() {}
public function head() {}
public function post() {}
public function put() {}
public function delete() {}
}
除了这些,我还应该做什么?