view()
view(string $view_name, \type $data = null)
Finds and displays the given view, and makes the values in $data available to it.
The name of the view is passed in without the leading "views/" directory or the trailing ".php" extension. So loading a view with $this->view("myview"); would look for a file called "views/myview.php"
the data is made available my taking the keys of $data, and assigning them to a locally scoped variable of the same name. array( 'title' => 'The Title' ) would be available in the view as $title.
Parameters
string | $view_name | The name of the view to load |
\type | $data | array of values to make available to the view |