(Yaf >=1.0.0)
Yaf_Controller_Abstract::getView — 获取视图引擎
此函数没有参数。
Yaf_View_Interface 实例,如果没有可用的视图引擎则返回 null。
示例 #1 Yaf_Controller_Abstract::getView() 示例
<?php
class ProductController extends Yaf_Controller_Abstract
{
public function indexAction() {
$view = $this->getView();
// 把 $products 导出到模板 product/index.phtml
$view->assign("products", array("yaf", "php"));
}
}
?>