Revert node.config.php into Config table
This commit is contained in:
17
src/DI.php
17
src/DI.php
@@ -37,9 +37,24 @@ abstract class DI
|
||||
/** @var Dice */
|
||||
private static $dice;
|
||||
|
||||
public static function init(Dice $dice)
|
||||
public static function init(Dice $dice, bool $disableDepByHand = false)
|
||||
{
|
||||
self::$dice = $dice;
|
||||
|
||||
if (!$disableDepByHand) {
|
||||
self::setCompositeRootDependencyByHand();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* I HATE this method, but everything else needs refactoring at the database itself
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function setCompositeRootDependencyByHand()
|
||||
{
|
||||
$database = static::dba();
|
||||
$database->setDependency(static::config(), static::profiler(), static::logger());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user