View_Interface
interface 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
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
render(string $tpl, array $tpl_vars = null)
Render a template and return the result.
setScriptPath(string $template_dir)
Set the templates base directory, this is usually called by \Yaf\Dispatcher