From f6deafbc34451dd1e9d5c151bff0447f1a7870ba Mon Sep 17 00:00:00 2001 From: Zankaria Date: Tue, 26 Nov 2024 00:37:57 +0100 Subject: [PATCH] context.php: add ReportQueries class --- inc/context.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/inc/context.php b/inc/context.php index a85f2f05..6ff656fe 100644 --- a/inc/context.php +++ b/inc/context.php @@ -40,6 +40,12 @@ function build_context(array $config): Context { // Ensure the PDO is initialized. sql_open(); return $pdo; + }, + ReportQueries::class => function($c) { + $auto_maintenance = (bool)$c->get('config')['auto_maintenance']; + $pdo = $c->get(\PDO::class); + $cache = $c->get(CacheDriver::class); + return new ReportQueries($pdo, $cache, $auto_maintenance); } ]); }