function($c) { if (! function_exists('dump') ) { function dump(...$what) {} } return new class implements MiddlewareInterface { public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface { return $handler->handle($request); } }; }, "errorHandler" => create(DebogueurMiddleware::class)->constructor(getenv('DEBOGUEUR_HASH') ?: "", null, get('app.errorhandler.html')), 'app.errorhandler.html' => function($c, Picea $picea) { return function(\Throwable $exception) use ($picea) { error_log($exception->getMessage()); return new HtmlResponse($picea->renderHtml('lean/error/500', [ 'title' => "Une erreur s'est produite lors de l'exécution du script.", 'subtitle' => "Êtes-vous connecté avec le bon compte ?", 'message' => $exception->getMessage(), 'exception' => $exception, ])); }; }, 'routes.caching' => create(Kash\ApcuCache::class)->constructor(get(Kash\CacheInvalidator::class), "lean.routes", random_int(3600, 7200)), 'breadcrumbs.caching' => create(Kash\ApcuCache::class)->constructor(get(Kash\CacheInvalidator::class), "lean.breadcrumbs", random_int(3600, 7200)), 'ulmus.caching' => create(Kash\ApcuCache::class)->constructor( get(Kash\CacheInvalidator::class), "ulmus.entities", random_int(3600, 7200)), 'cronard.caching' => create(Kash\ApcuCache::class)->constructor( get(Kash\CacheInvalidator::class), "lean.cronards", random_int(3600, 7200)), ];