Skip to content

Commit 400c087

Browse files
committed
add framework code as people would probably modify it following first code example (putting object creations in src/Simplex/Framework.php)
1 parent de69a87 commit 400c087

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

book/part12.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,20 @@ The front controller is now only about wiring everything together::
181181

182182
$response->send();
183183

184+
As all the objects are now created in the dependency injection container, the framework code should be the previous simple version::
185+
186+
<?php
187+
188+
// example.com/src/Simplex/Framework.php
189+
190+
namespace Simplex;
191+
192+
use Symfony\Component\HttpKernel\HttpKernel;
193+
194+
class Framework extends HttpKernel
195+
{
196+
}
197+
184198
.. note::
185199

186200
If you want a light alternative for your container, consider `Pimple`_, a

0 commit comments

Comments
 (0)