add solutions for chapter 9 and fix urltypos
This commit is contained in:
parent
0b1fa54d49
commit
6920ea390d
5 changed files with 17 additions and 19 deletions
|
@ -1,7 +1,6 @@
|
|||
<?php declare(strict_types=1);
|
||||
|
||||
use DI\ContainerBuilder;
|
||||
use FastRoute\Dispatcher;
|
||||
use Laminas\Diactoros\Response;
|
||||
use Laminas\Diactoros\ServerRequestFactory;
|
||||
use Lubian\NoFramework\Service\Time\Clock;
|
||||
|
@ -12,12 +11,13 @@ use Psr\Http\Message\ServerRequestInterface;
|
|||
use function FastRoute\simpleDispatcher;
|
||||
|
||||
$builder = new ContainerBuilder;
|
||||
|
||||
$builder->addDefinitions([
|
||||
ServerRequestInterface::class => fn () => ServerRequestFactory::fromGlobals(),
|
||||
ResponseInterface::class => fn () => new Response,
|
||||
Dispatcher::class => fn () => simpleDispatcher(require __DIR__ . '/routes.php'),
|
||||
Clock::class => fn () => new SystemClock,
|
||||
]);
|
||||
$builder->addDefinitions(
|
||||
[
|
||||
ServerRequestInterface::class => fn () => ServerRequestFactory::fromGlobals(),
|
||||
ResponseInterface::class => fn () => new Response,
|
||||
FastRoute\Dispatcher::class => fn () => simpleDispatcher(require __DIR__ . '/routes.php'),
|
||||
Clock::class => fn () => new SystemClock,
|
||||
]
|
||||
);
|
||||
|
||||
return $builder->build();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue