0.0.1
This commit is contained in:
@@ -9,8 +9,6 @@ use \Potter\Event\Event;
|
||||
|
||||
trait Behaviour
|
||||
{
|
||||
abstract private static function addConsoleBehaviour(Container $container): void;
|
||||
|
||||
private static function addLogger(Container $container): void
|
||||
{
|
||||
$container->addShared(Logger::class)
|
||||
@@ -19,17 +17,6 @@ trait Behaviour
|
||||
}
|
||||
|
||||
private static function addLoggerBehaviour(Container $container): void
|
||||
{
|
||||
if (static::hasDispatcher($container)) {
|
||||
static::getDispatcher($container)
|
||||
->subscribeTo('applicationStart', function (Event $event) {
|
||||
self::_addLoggerBehaviour($event->getArgument('container')); });
|
||||
} else {
|
||||
self::_addLoggerBehaviour($container);
|
||||
}
|
||||
}
|
||||
|
||||
private static function _addLoggerBehaviour(Container $container): void
|
||||
{
|
||||
self::addLoggerHandler($container);
|
||||
self::addLogger($container);
|
||||
|
||||
Reference in New Issue
Block a user