Skip to content

Commit

Permalink
View->render($file), closes #85.
Browse files Browse the repository at this point in the history
  • Loading branch information
Geert De Deckere committed Jul 31, 2009
1 parent 3c66a30 commit 4fa46d9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions classes/kohana/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,16 @@ public function bind_global($key, & $value)
* overwritten by the local variable.
*
* @throws View_Exception
* @param view filename
* @return string
*/
public function render($file = NULL)
{
if ($file !== NULL)
{
$this->set_filename($file);
}

if (empty($this->_file))
{
throw new Kohana_View_Exception('You must set the file to use within your view before rendering');
Expand Down

0 comments on commit 4fa46d9

Please sign in to comment.