Skip to content

Commit 55a483f

Browse files
committed
Remove YOLO middleware example, for now
1 parent 03a4ea1 commit 55a483f

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

source/index.html

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -58,28 +58,6 @@ <h2>What is Stack?</h2>
5858
<img src="{{ site.url }}/img/middleware.png" alt="">
5959
</figure>
6060
-->
61-
62-
<p>A simple middleware, which appends "YOLO!" in big bold text to every request, looks like this:</p>
63-
<pre><code class="php">{%- filter escape -%}use Symfony\Component\HttpFoundation\Request;
64-
use Symfony\Component\HttpKernel\HttpKernelInterface;
65-
66-
class YoloMiddleware implements HttpKernelInterface
67-
{
68-
protected $app;
69-
70-
public function __construct(HttpKernelInterface $app)
71-
{
72-
$this->app = $app;
73-
}
74-
75-
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
76-
{
77-
$response = $this->app->handle($request, $type, $catch);
78-
$response->setContent($response->getContent() . "<h1>YOLO!</h1>");
79-
80-
return $response;
81-
}
82-
}{%- endfilter -%}</code></pre>
8361
</div>
8462

8563
<hr>

0 commit comments

Comments
 (0)