diff --git a/src/App.php b/src/App.php index ea6111d80d..f499ad9510 100644 --- a/src/App.php +++ b/src/App.php @@ -129,6 +129,11 @@ class App */ private $profiler; + /** + * @var IDatabase The database of this app + */ + private $database; + /** * Returns the current config cache of this node * @@ -184,6 +189,16 @@ class App return $this->router; } + /** + * The database of this app + * + * @return IDatabase + */ + public function getDb() + { + return $this->database; + } + /** * Register a stylesheet file path to be included in the tag of every page. * Inclusion is done in App->initHead(). @@ -241,6 +256,7 @@ class App BaseObject::setApp($this); $this->config = $config; + $this->database = $database; $this->mode = $mode; $this->router = $router; $this->profiler = $profiler;