Pass request method and uri to before and after filters.

This commit is contained in:
Taylor Otwell 2011-08-05 15:49:59 -05:00
parent 1a96696046
commit fe0f4a76f6
1 changed files with 2 additions and 2 deletions

View File

@ -141,7 +141,7 @@
// -------------------------------------------------------------- // --------------------------------------------------------------
foreach (array('before', ACTIVE_MODULE.'::before') as $filter) foreach (array('before', ACTIVE_MODULE.'::before') as $filter)
{ {
$response = Routing\Filter::call($filter, array(), true); $response = Routing\Filter::call($filter, array(Request::method(), Request::uri()), true);
if ( ! is_null($response)) break; if ( ! is_null($response)) break;
} }
@ -163,7 +163,7 @@
// -------------------------------------------------------------- // --------------------------------------------------------------
foreach (array(ACTIVE_MODULE.'::after', 'after') as $filter) foreach (array(ACTIVE_MODULE.'::after', 'after') as $filter)
{ {
Routing\Filter::call($filter, array($response)); Routing\Filter::call($filter, array($response, Request::method(), Request::uri()));
} }
// -------------------------------------------------------------- // --------------------------------------------------------------