mirror of
https://github.com/friendica/friendica
synced 2024-12-23 04:00:15 +00:00
inject container inside app instance
This commit is contained in:
parent
16bdd76be1
commit
241031f1fa
1 changed files with 8 additions and 0 deletions
|
@ -55,6 +55,7 @@ class App
|
||||||
public static function fromDice(Dice $dice): self
|
public static function fromDice(Dice $dice): self
|
||||||
{
|
{
|
||||||
return new self(
|
return new self(
|
||||||
|
$dice,
|
||||||
$dice->create(Request::class),
|
$dice->create(Request::class),
|
||||||
$dice->create(Authentication::class),
|
$dice->create(Authentication::class),
|
||||||
$dice->create(IManageConfigValues::class),
|
$dice->create(IManageConfigValues::class),
|
||||||
|
@ -71,6 +72,11 @@ class App
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var Dice
|
||||||
|
*/
|
||||||
|
private $container;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Mode The Mode of the Application
|
* @var Mode The Mode of the Application
|
||||||
*/
|
*/
|
||||||
|
@ -123,6 +129,7 @@ class App
|
||||||
private $appHelper;
|
private $appHelper;
|
||||||
|
|
||||||
private function __construct(
|
private function __construct(
|
||||||
|
Dice $container,
|
||||||
Request $request,
|
Request $request,
|
||||||
Authentication $auth,
|
Authentication $auth,
|
||||||
IManageConfigValues $config,
|
IManageConfigValues $config,
|
||||||
|
@ -137,6 +144,7 @@ class App
|
||||||
ViewDefinition $viewDefinition,
|
ViewDefinition $viewDefinition,
|
||||||
AppHelper $appHelper = null,
|
AppHelper $appHelper = null,
|
||||||
) {
|
) {
|
||||||
|
$this->container = $container;
|
||||||
$this->requestId = $request->getRequestId();
|
$this->requestId = $request->getRequestId();
|
||||||
$this->auth = $auth;
|
$this->auth = $auth;
|
||||||
$this->config = $config;
|
$this->config = $config;
|
||||||
|
|
Loading…
Reference in a new issue