|
@@ 136-142 (lines=7) @@
|
| 133 |
|
* @param Response $response the generated response from the controller |
| 134 |
|
* @return Response a Response object |
| 135 |
|
*/ |
| 136 |
|
public function afterController(Controller $controller, $methodName, Response $response){ |
| 137 |
|
for($i=count($this->middlewares)-1; $i>=0; $i--){ |
| 138 |
|
$middleware = $this->middlewares[$i]; |
| 139 |
|
$response = $middleware->afterController($controller, $methodName, $response); |
| 140 |
|
} |
| 141 |
|
return $response; |
| 142 |
|
} |
| 143 |
|
|
| 144 |
|
|
| 145 |
|
/** |
|
@@ 155-161 (lines=7) @@
|
| 152 |
|
* @param string $output the generated output from a response |
| 153 |
|
* @return string the output that should be printed |
| 154 |
|
*/ |
| 155 |
|
public function beforeOutput(Controller $controller, $methodName, $output){ |
| 156 |
|
for($i=count($this->middlewares)-1; $i>=0; $i--){ |
| 157 |
|
$middleware = $this->middlewares[$i]; |
| 158 |
|
$output = $middleware->beforeOutput($controller, $methodName, $output); |
| 159 |
|
} |
| 160 |
|
return $output; |
| 161 |
|
} |
| 162 |
|
|
| 163 |
|
} |
| 164 |
|
|