You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/index.html
+27-16Lines changed: 27 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -20,26 +20,37 @@ <h1>Stack</h1>
20
20
21
21
<hr>
22
22
23
-
<divclass="why">
24
-
<h2>Why?</h2>
23
+
<divclass="about text">
24
+
<h2>A common layer</h2>
25
25
<p>
26
-
Right now there is no easy way to re-use HTTP-specific code in PHP. Accessing superglobals and emitting headers and data as side effects is messy and unpredictable. While frameworks are becoming more decoupled, they still have their own implementation of anything that touches HTTP.
26
+
What do we want? Re-use at the web layer!
27
27
</p>
28
28
<p>
29
-
We want to fix this.
29
+
Superglobals and side-effecting output mechanisms of PHP make this challenging and force every framework to re-invent.
30
30
</p>
31
31
<p>
32
-
What worked for the Ruby world with <ahref="http://rack.github.io/">Rack</a> (similar interfaces exist for Java, Python, Perl and others) can work for PHP with Stack.
32
+
But Symfony's HttpKernelInterface provides a solid abstraction, which makes creating and sharing framework-agnostic HTTP filters a breeze!
33
33
</p>
34
34
</div>
35
35
36
36
<hr>
37
37
38
-
<divclass="about">
39
-
<h2>What is Stack?</h2>
38
+
<divclass="about text">
39
+
<h2>HttpKernel</h2>
40
+
<p>
41
+
The <ahref="https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/HttpKernelInterface.php">HttpKernelInterface</a> models web request and response as PHP objects, giving them value semantics.
Stack is a convention for composing <ahref="https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/HttpKernelInterface.php">HttpKernelInterface</a> middlewares. Any framework based on Symfony2's HttpKernelInterface can use these middlewares. They allow an application to be extended in a generic way, simply by wrapping objects around the kernel.
53
+
Stack is a convention for composing HttpKernelInterface middlewares.
43
54
</p>
44
55
45
56
<!--
@@ -74,7 +85,7 @@ <h2>What is Stack?</h2>
74
85
<hr>
75
86
76
87
<divclass="frameworks">
77
-
<h2>Works already with</h2>
88
+
<h2class="text-center">Supported frameworks</h2>
78
89
79
90
{% spaceless %}
80
91
<ulclass="frameworks-logo-list clearfix">
@@ -90,16 +101,16 @@ <h2>Works already with</h2>
90
101
91
102
<hr>
92
103
93
-
<divclass="middleware">
104
+
<divclass="middleware text">
94
105
<h2>Conventions</h2>
95
106
<p>
96
-
A stack middleware is just an object that follows these conventions:
107
+
A stack middleware is just an object that follows these <strong>conventions</strong>:
97
108
</p>
98
-
<ul>
99
-
<li>Implement the <code>HttpKernelInterface</code></li>
100
-
<li>Take the decorated app as the first constructor argument</li>
101
-
<li>Decorate the handle call, delegate to the decorated app</li>
102
-
</ul>
109
+
<olclass="conventions inline clearfix">
110
+
<liclass="span4 clearfix"><divclass="no">1</div>Implement the <strong>HttpKernelInterface</strong></li>
111
+
<liclass="span4 clearfix"><divclass="no">2</div>Take the <strong>decorated app</strong> as the first constructor argument</li>
112
+
<liclass="span4 clearfix"><divclass="no">3</div>Decorate the handle call, <strong>delegate</strong> to the decorated app</li>
113
+
</ol>
103
114
104
115
<p>
105
116
Yes, leveraging the HTTP abstraction is that easy!
0 commit comments