mirror of https://github.com/friendica/friendica
DB getter
This commit is contained in:
parent
bfc4615440
commit
7af787728f
16
src/App.php
16
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 <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;
|
||||
|
|
Loading…
Reference in New Issue