Skip to content

Commit

Permalink
🔧 get registered event sinks from factory
Browse files Browse the repository at this point in the history
  • Loading branch information
gowrizrh committed Aug 7, 2024
1 parent 3867d59 commit 7233816
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Service/AsyncEvent/NotifierFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,12 @@ public function create(string $type): NotifierInterface

return $notifier;
}

/**
* @inheritDoc
*/
public function getSinks(): array
{
return array_keys($this->notifierClasses);
}
}
7 changes: 7 additions & 0 deletions Service/AsyncEvent/NotifierFactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,11 @@ interface NotifierFactoryInterface
* @return NotifierInterface
*/
public function create(string $type): NotifierInterface;

/**
* Get available event sinks
*
* @return array
*/
public function getSinks(): array;
}

0 comments on commit 7233816

Please sign in to comment.