Ejemplo n.º 1
0
 /**
  * Calls 'after' filters, if any supplied
  *
  * @param  Illuminate\Http\Response $response
  * @return Illuminate\Http\Response
  */
 private function callAfterFilters($response)
 {
     // Only if there exists a route AND after filters, we will apply the after
     // filter. Why? Because if there's no matching route, then, the after
     // filter will squak out as we'll be missing the 'route' parameter
     // that it needs.
     if (($route = Router::getCurrentRoute()) && !is_null($after = Config::get('hive::response.after'))) {
         $afterFilters = Route::parseFilters($after);
         foreach ($afterFilters as $filter => $parameters) {
             Router::callRouteFilter($filter, $parameters, $route, Router::getCurrentRequest(), $response);
         }
     }
     return $response;
 }