Commit 7ad1126c authored by Taylor Otwell's avatar Taylor Otwell

Add sub-view evaluating back to view class.

parent 120d6a5d
......@@ -170,6 +170,11 @@ class View {
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); }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment