mirror of
https://github.com/friendica/friendica
synced 2024-05-23 04:14:58 +02:00
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;
|
private $profiler;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var IDatabase The database of this app
|
||||||
|
*/
|
||||||
|
private $database;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the current config cache of this node
|
* Returns the current config cache of this node
|
||||||
*
|
*
|
||||||
|
@ -184,6 +189,16 @@ class App
|
||||||
return $this->router;
|
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.
|
* Register a stylesheet file path to be included in the <head> tag of every page.
|
||||||
* Inclusion is done in App->initHead().
|
* Inclusion is done in App->initHead().
|
||||||
|
@ -241,6 +256,7 @@ class App
|
||||||
BaseObject::setApp($this);
|
BaseObject::setApp($this);
|
||||||
|
|
||||||
$this->config = $config;
|
$this->config = $config;
|
||||||
|
$this->database = $database;
|
||||||
$this->mode = $mode;
|
$this->mode = $mode;
|
||||||
$this->router = $router;
|
$this->router = $router;
|
||||||
$this->profiler = $profiler;
|
$this->profiler = $profiler;
|
||||||
|
|
Loading…
Reference in a new issue