Add sub-view evaluating back to view class.

This commit is contained in:
Taylor Otwell 2011-08-08 15:19:44 -05:00
parent 120d6a5da6
commit 7ad1126cf1
1 changed files with 5 additions and 0 deletions

View File

@ -170,6 +170,11 @@ public function get()
throw new \Exception("View [$view] does not exist.");
}
foreach ($this->data as &$data)
{
if ($data instanceof View or $data instanceof Response) $data = (string) $data;
}
ob_start() and extract($this->data, EXTR_SKIP);
try { include $this->path.$view.EXT; } catch (\Exception $e) { Error::handle($e); }