DDD\Domain\DomainEventPublisher::publish PHP Method

publish() public method

public publish ( DDD\Domain\DomainEvent $aDomainEvent )
$aDomainEvent DDD\Domain\DomainEvent
    public function publish(DomainEvent $aDomainEvent)
    {
        foreach ($this->subscribers as $aSubscriber) {
            if ($aSubscriber->isSubscribedTo($aDomainEvent)) {
                $aSubscriber->handle($aDomainEvent);
            }
        }
    }