File tree Expand file tree Collapse file tree 1 file changed +0
-22
lines changed
Expand file tree Collapse file tree 1 file changed +0
-22
lines changed Original file line number Diff line number Diff line change @@ -76,28 +76,6 @@ <h2>Conventions</h2>
7676 < li > Decorate the handle call, delegate to the decorated app</ li >
7777 </ ul >
7878
79- < p > A simple middleware could look like this:</ p >
80- < pre > < code class ="php "> use Symfony\Component\HttpFoundation\Request;
81- use Symfony\Component\HttpKernel\HttpKernelInterface;
82-
83- class MyMiddleware implements HttpKernelInterface
84- {
85- protected $app;
86-
87- public function __construct(HttpKernelInterface $app)
88- {
89- $this->app = $app;
90- }
91-
92- public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
93- {
94- $response = $this->app->handle($request, $type, $catch);
95- $response->setContent($response->getContent() . "YOLO!");
96-
97- return $response;
98- }
99- }</ code > </ pre >
100-
10179 < p >
10280 Yes, leveraging the HTTP abstraction is that easy!
10381 </ p >
You can’t perform that action at this time.
0 commit comments