aboutsummaryrefslogtreecommitdiff
path: root/ratatoeskr/sys/Env.php
diff options
context:
space:
mode:
Diffstat (limited to 'ratatoeskr/sys/Env.php')
-rw-r--r--ratatoeskr/sys/Env.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/ratatoeskr/sys/Env.php b/ratatoeskr/sys/Env.php
index cfe1598..63d079d 100644
--- a/ratatoeskr/sys/Env.php
+++ b/ratatoeskr/sys/Env.php
@@ -34,4 +34,13 @@ class Env
{
return $this->lazy("textprocessors", [TextprocessorRepository::class, 'buildDefault']);
}
+
+ public function database(): Database
+ {
+ return $this->lazy("database", static function () {
+ global $config;
+
+ return Database::fromConfig($config);
+ });
+ }
}