Skip to content

Commit

Permalink
Get a specific listener by id
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosbuenosvinos committed Jul 22, 2016
1 parent 355fa44 commit b540450
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Domain/DomainEventPublisher.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ public function subscribe($aDomainEventSubscriber)
return $id;
}

public function ofId($id)
{
return isset($this->subscribers[$id]) ? $this->subscribers[$id] : null;
}

public function unsubscribe($id)
{
unset($this->subscribers[$id]);
Expand Down

0 comments on commit b540450

Please sign in to comment.