zf2 如何实现模版切换
use Zend\View\Model\ViewModel; // Add resource class IndexController extends AbstractActionController { public indexAction() { $viewModel = new ViewModel(); $viewModel->setTemplate('application/index/index'); return $viewModel; }
详见: http://framework.zend.com/manual/2.2/en/modules/zend.view.quick-start.html
详见: http://framework.zend.com/manual/2.2/en/modules/zend.view.quick-start.html