getting filename on Zend_View
Is it possible to get the filename of a pht开发者_如何学编程ml file that's been assign to Zend_View?
For instance,
i've got this on my controller
$this->view = new Zend_View();
$this->view->setScriptPath(APPLICATION_PATH . "/views/scripts/"); $this->view->render('email/xxx.phtml');
the question is,
how do I get 'email/xxx.phtml' from the object?
you can use the ViewRenderer Helper, from your controller:
$viewRenderer = $this->_helper->viewRenderer;
$viewScript = $viewRenderer->getViewScript();
take a look at http://framework.zend.com/manual/en/zend.controller.actionhelpers.html#zend.controller.actionhelper.viewrenderer.basicusage
精彩评论