(Yaf >=1.0.0)
Yaf_Dispatcher::initView — Initialize view and return it
$templates_dir, ?array $options = null): Yaf_View_Interface|null|falseInitialize and return a Yaf_View_Simple instance bound to the dispatcher, using the given template directory.
templates_dirThe directory that holds the view templates.
optionsOptions passed to the view engine, see Yaf_View_Simple::__construct().
A Yaf_View_Interface instance on success, or
false / null on failure.
Example #1 Yaf_Dispatcher::initView() example
<?php
$app = new Yaf_Application(dirname(__FILE__) . "/conf/application.ini");
$view = Yaf_Dispatcher::getInstance()->initView(
dirname(__FILE__) . "/application/views",
array("tpl_suffix" => ".html")
);
$view->assign("title", "Home");
?>