Introduce dynamic hook loading
- Dynamically load addon files - Dynamically load hooks - Rewrite Logger-logic to use new hook logic (Monolog is working again)
This commit is contained in:
23
src/DI.php
23
src/DI.php
@@ -22,10 +22,12 @@
|
||||
namespace Friendica;
|
||||
|
||||
use Dice\Dice;
|
||||
use Friendica\Core\Session\Capability\IHandleSessions;
|
||||
use Friendica\Core\Session\Capability\IHandleUserSessions;
|
||||
use Friendica\Navigation\SystemMessages;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use \Friendica\Core\Logger\Capabilities\ICheckLoggerSettings;
|
||||
use \Friendica\Core\Logger\Util\LoggerSettingsCheck;
|
||||
use \Friendica\Core\Session\Capability\IHandleSessions;
|
||||
use \Friendica\Core\Session\Capability\IHandleUserSessions;
|
||||
use \Friendica\Navigation\SystemMessages;
|
||||
use \Psr\Log\LoggerInterface;
|
||||
|
||||
/**
|
||||
* This class is capable of getting all dynamic created classes
|
||||
@@ -295,6 +297,11 @@ abstract class DI
|
||||
static::init($flushDice);
|
||||
}
|
||||
|
||||
public static function loggCheck(): ICheckLoggerSettings
|
||||
{
|
||||
return self::$dice->create(LoggerSettingsCheck::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return LoggerInterface
|
||||
*/
|
||||
@@ -692,14 +699,6 @@ abstract class DI
|
||||
return self::$dice->create(Util\DateTimeFormat::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Util\FileSystem
|
||||
*/
|
||||
public static function fs()
|
||||
{
|
||||
return self::$dice->create(Util\FileSystem::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Util\Profiler
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user