【发布时间】:2011-10-01 21:43:03
【问题描述】:
我有 Action Helper,它是数据库抽象层。
我想在 View Helper 中访问它以读取和呈现模型中的一些数据。
在Controller中我调用Action Helper作为代理方法,但是在View Helper中如何实现呢?
控制器中的某处:
$this->_helper->Service("Custom\\PageService");
Service.php:
...
public function direct($serviceClass)
{
return new $serviceClass($this->em);
}
【问题讨论】:
标签: zend-framework view-helpers