Yaf_View_Interface
interface Yaf_View_Interface (View source)
Yaf provides a ability for developers to use custom view engine instead of build-in engine which is Yaf_View_Simple. There is a example to explain how to do this, please see Yaf_Dispatcher::setView()
Methods
Assign values to View engine, then the value can access directly by name in template.
Render a template and output the result immediately.
No description
Render a template and return the result.
Set the templates base directory, this is usually called by Yaf_Dispatcher
Details
Yaf_View_Interface|bool
assign(string|array $name, mixed $value = '')
Assign values to View engine, then the value can access directly by name in template.
bool
display(string $tpl, array $tpl_vars = null)
Render a template and output the result immediately.
string
getScriptPath()
No description
string|bool
render(string $tpl, array $tpl_vars = null)
Render a template and return the result.
bool
setScriptPath(string $template_dir)
Set the templates base directory, this is usually called by Yaf_Dispatcher