DB getter

This commit is contained in:
Philipp Holzer 2019-02-28 13:58:01 +01:00
parent bfc4615440
commit 7af787728f
No known key found for this signature in database
GPG Key ID: 517BE60E2CE5C8A5
1 changed files with 16 additions and 0 deletions

View File

@ -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 <head> 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;