lithium\template\view\adapter\Simple::render()
Implements
lithium\template\view\Renderer::render()
Renders content from a template file provided by template()
.
Parameters
-
string
$template
-
array
$data
-
array
$options
Returns
stringSource
public function render($template, $data = array(), array $options = array()) {
$defaults = array('context' => array());
$options += $defaults;
$context = array();
$this->_context = $options['context'] + $this->_context;
foreach (array_keys($this->_context) as $key) {
$context[$key] = $this->__get($key);
}
$data = array_merge($this->_toString($context), $this->_toString($data));
return String::insert($template, $data, $options);
}