Prooph\EventStore\Metadata\MetadataEnricherPlugin::onEventStoreCreateStream PHP Метод

onEventStoreCreateStream() публичный Метод

Add event metadata on event store createStream.
public onEventStoreCreateStream ( Prooph\Common\Event\ActionEvent $createEvent )
$createEvent Prooph\Common\Event\ActionEvent
    public function onEventStoreCreateStream(ActionEvent $createEvent)
    {
        $stream = $createEvent->getParam('stream');
        if (!$stream instanceof Stream) {
            return;
        }
        $streamEvents = $stream->streamEvents();
        $streamEvents = $this->handleRecordedEvents($streamEvents);
        $createEvent->setParam('stream', new Stream($stream->streamName(), $streamEvents));
    }