This commit is contained in:
parent
a1adc59ad9
commit
0962b609c4
3 changed files with 29 additions and 5 deletions
|
@ -1,2 +1,26 @@
|
|||
<?php
|
||||
declare(strict_types=1);
|
||||
declare(strict_types=1);
|
||||
|
||||
|
||||
use GamesShop\ContainerHandler;
|
||||
use GamesShop\DoctrineManager;
|
||||
use GamesShop\Environment\EnvironmentHandler;
|
||||
use GamesShop\Routing\Router;
|
||||
use Laminas\HttpHandlerRunner\Emitter\SapiEmitter;
|
||||
use Whoops\Handler\HandlerInterface;
|
||||
use Whoops\Handler\PrettyPageHandler;
|
||||
use Whoops\Run;
|
||||
|
||||
require_once __DIR__ . '/../src/php/bootstrap.php';
|
||||
|
||||
$whoops = new Run();
|
||||
$prettyPageHandler = new PrettyPageHandler();
|
||||
$whoops->pushHandler($prettyPageHandler);
|
||||
$whoops->register();
|
||||
|
||||
ContainerHandler::getInstance()->addShared(HandlerInterface::class, $prettyPageHandler);
|
||||
|
||||
$router = ContainerHandler::getInstance()->get(Router::class);
|
||||
$result = $router->route();
|
||||
|
||||
(new SapiEmitter)->emit($result);
|
Loading…
Add table
Add a link
Reference in a new issue