Skip to content

Commit 9687a56

Browse files
committed
Add documentation
1 parent a666cd5 commit 9687a56

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ $app->get('/hello/{name}', function (Request $request, Response $response) {
3333
$app->run();
3434
```
3535

36+
You may notice the `DI\Bridge\Slim\App` class is very simple. You can very well create the container yourself and pass it to the constructor of `Slim\App`. Just don't forget to register the [`src/config.php`](src/config.php) file in the container.
37+
3638
### Configuring PHP-DI
3739

3840
If you want to configure PHP-DI, simply extend the `DI\Bridge\Slim\App` class and override the `configureContainer()` method:

src/App.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
/**
88
* Slim application configured with PHP-DI.
9+
*
10+
* As you can see, this class is very basic and is only useful to get started quickly.
11+
* You can also very well *not* use it and build the container manually.
912
*/
1013
class App extends \Slim\App
1114
{

0 commit comments

Comments
 (0)