Skip to content

Commit

Permalink
Added correct installation guide url
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelgfeller committed Sep 24, 2024
1 parent 001768b commit 8a4d365
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ templates.
With frontend [**slim-starter**](https://github.com/samuelgfeller/slim-starter) or just for an API:
[**slim-api-starter**](https://github.com/samuelgfeller/slim-api-starter).

Please read the [**installation guide**](https://samuel-gfeller.ch/docs/Installation-Guide)
Please read the [**installation guide**](https://samuel-gfeller.ch/docs/Slim-Example-Project-Installation-Guide)
to get started.

## Features
Expand Down
5 changes: 5 additions & 0 deletions config/container.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Documentation: https://samuel-gfeller.ch/docs/Dependency-Injection.
*/

use App\Application\Data\UserNetworkSessionData;
use App\Infrastructure\Utility\Settings;
use Cake\Database\Connection;
use Monolog\Formatter\LineFormatter;
Expand Down Expand Up @@ -187,4 +188,8 @@

return $eventDispatcher;
},
// Add shared UserNetworkSessionData to the container so that the DTO can be populated and used in different places
UserNetworkSessionData::class => function () {
return new UserNetworkSessionData();
}
];
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
final readonly class UserNetworkSessionDataMiddleware implements MiddlewareInterface
{
public function __construct(
// The UserNetworkSessionData DTO object is registered and created in the container definition
// container.php so that this middleware can populate it with data that are also available
// by any service that also injects this DTO object.
private UserNetworkSessionData $clientNetworkData,
private SessionInterface $session,
) {
Expand Down

0 comments on commit 8a4d365

Please sign in to comment.