getConfig()); if (Yaf_Application::app()->environ() !== 'product') { error_reporting(E_ALL & ~ E_NOTICE); ini_set('display_errors', 1); } } public function _initView(Yaf_Dispatcher $dispatcher) { // 禁用yaf自带的模板引擎 Yaf_Dispatcher::getInstance()->disableView(); //设置smarty $smarty = new Smarty_Adapter(null , Yaf_Application::app()->getConfig()->smarty); return Yaf_Dispatcher::getInstance()->setView($smarty); } }