时间:2021-07-01 10:21:17 帮助过:25人阅读
你的写法是错误的(或遗漏了什么)
所以不理解是正常的
你的写法是错误的(或遗漏了什么)
所以不理解是正常的
namespace Addons\Wdingzhi\Controller;
use Home\Controller\AddonsController;
class BaseController extends AddonsController {
function _initialize() {
parent::_initialize();
class BaseController extends Home\Controller\AddonsController {
...
}
这是正确的
use Home\Controller\AddonsController;
class BaseController extends AddonsController {
...
}
是错误的
use Home\Controller\AddonsController as AddonsController;
class BaseController extends AddonsController {
...
}
或
use Home\Controller\AddonsController;
class BaseController extends Controller\AddonsController {
...
}
才是正确的
class BaseController extends Home\Controller\AddonsController {
...
}
这是正确的
use Home\Controller\AddonsController;
class BaseController extends AddonsController {
...
}
是错误的
use Home\Controller\AddonsController as AddonsController;
class BaseController extends AddonsController {
...
}
或
use Home\Controller\AddonsController;
class BaseController extends Controller\AddonsController {
...
}
才是正确的