adjust how the response is rendered, as well as move input flashing to after filter.

This commit is contained in:
Taylor Otwell
2011-11-20 22:47:56 -06:00
parent 7a9631975f
commit 10b9001e13
4 changed files with 13 additions and 17 deletions

View File

@@ -111,14 +111,17 @@ class Route {
}
}
// The after filter and the framework expects all responses to
// be instances of the Response class. If the route did not
// return an instsance of Response, we will make on now.
if ( ! $response instanceof Response)
{
$response = new Response($response);
}
// Stringify the response. We need to force the response to be
// stringed before closing the session, since the developer may
// be using the session within their views, so we cannot age
// the session data until the view is rendered.
$response->content = $response->render();
$filters = array_merge($this->filters('after'), array('after'));
Filter::run($filters, array($response));