多层控制器支持能使用接口吗?

浏览:385 发布日期:2013/05/16 分类:求助交流
Lib\IBLL\IndexIBLL.class.php
<?php
interface IndexIBLL {
public function test();
}
?>
Lib\BLL\IndexBLL.class.php
<?php
class IndexBLL implements IndexIBLL {
public function test()
{
}
}
?>
Lib\Action\IndexAction.class.php
<?php
class IndexAction extends Action {
public function index() {
$bll=new IndexBLL();
$bll->test();
}
}
?>
显示错误

如果加个A方法为
A('Index','BLL');
$bll=new IndexBLL();
$bll->test();

显示能调用BLL了,但 IBLL调用出错

现在怎么有办法调用得到IBLL呢?
最佳答案
评论( 相关
后面还有条评论,点击查看>>