我有一些表单由于某些原因必须在不同的模块引导程序中实例化。但是在我想使用的那些形式中
$this->setAction($this->getView()->url(array('controller' => 'foo', 'action' => 'bar')));
在构造函数中。但是,由于我在引导程序中,因此无法访问 viewhelper url,所以还有什么办法吗?我现在得到的是
Fatal error: Uncaught exception 'Zend_Controller_Router_Exception' with message 'Route default is not defined'
在那条线上。我没有自定义路由,所以我只使用默认路由器和路由。