Add docs
This commit is contained in:
parent
9b095f475b
commit
2bc9f085df
1 changed files with 11 additions and 1 deletions
12
src/DI.php
12
src/DI.php
|
@ -37,6 +37,15 @@ abstract class DI
|
||||||
/** @var Dice */
|
/** @var Dice */
|
||||||
private static $dice;
|
private static $dice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize the singleton DI container with the Dice instance
|
||||||
|
*
|
||||||
|
* @param Dice $dice The Dice instance
|
||||||
|
* @param bool $disableDepByHand If true, the database dependencies aren't set, thus any occurrence of logging or
|
||||||
|
* profiling in database methods would lead to an error. This flag is for testing only.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public static function init(Dice $dice, bool $disableDepByHand = false)
|
public static function init(Dice $dice, bool $disableDepByHand = false)
|
||||||
{
|
{
|
||||||
self::$dice = $dice;
|
self::$dice = $dice;
|
||||||
|
@ -48,8 +57,9 @@ abstract class DI
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* I HATE this method, but everything else needs refactoring at the database itself
|
* I HATE this method, but everything else needs refactoring at the database itself
|
||||||
|
* Set the database dependencies manually, because of current, circular dependencies between the database and the config table
|
||||||
*
|
*
|
||||||
* @return void
|
* @todo Instead of this madness, split the database in a core driver-dependent (mysql, mariadb, postgresql, ..) part without any other dependency unlike credentials and in the full-featured, driver-independent database class with all dependencies
|
||||||
*/
|
*/
|
||||||
public static function setCompositeRootDependencyByHand()
|
public static function setCompositeRootDependencyByHand()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue