我有 Action Helper,它是数据库抽象层。
我想在 View Helper 中访问它以读取和呈现模型中的一些数据。
在 Controller 中,我将 Action Helper 称为代理方法,但如何在 View Helper 中实现相同的功能?
控制器中的某处:
$this->_helper->Service("Custom\\PageService");
服务.php:
...
public function direct($serviceClass)
{
return new $serviceClass($this->em);
}