public static $params = array ()Parameters passed to the next render() that were assigned
via set().
public static init ($tpl)Sets the template renderer. The renderer can be any object that satisfies the following interface:
interface AbstractTemplateRenderer {
public function render ($template, $data = array ());
}
View provides a facility for calling functions or templates and returning their data, for the purpose of separating presentational logic from handlers.
Usage:
Assuming
myapp/hellocontains<p>Hello {{name}}</p>, then the above will output:Note: To pass the controller to a view function, here's how you do it: