This commit is contained in:
2026-08-12 17:43:16 -04:00
parent b67436c44f
commit bd2fe57682
+10 -6
View File
@@ -39,13 +39,17 @@ trait Behaviour
{
$dispatcher = static::getDispatcher($container);
$dispatcher->subscribeTo('applicationStart', function (Event $event) {
$container = $event->getArgument('container');
self::getLogger($container)->notice('Application start: ' . $_ENV['APPLICATION_NAME']); });
$dispatcher->subscribeTo('applicationStart',
function (Event $event) {
self::getLogger(
$event->getArgument('container'))
->notice('Application start: ' . $_ENV['APPLICATION_NAME']); });
$dispatcher->subscribeTo('applicationStop', function (Event $event) {
$container = $event->getArgument('container');
self::getLogger($container)->notice('Application stop: ' . $_ENV['APPLICATION_NAME']); });
$dispatcher->subscribeTo('applicationStop',
function (Event $event) {
self::getLogger(
$event->getArgument('container'))
->notice('Application stop: ' . $_ENV['APPLICATION_NAME']); });
}
abstract private static function getDispatcher(Container $container): \Potter\Event\Dispatcher;