forked from leftypol/leftypol
context.php: add ReportQueries class
This commit is contained in:
parent
8d8957cfeb
commit
f6deafbc34
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue