src/ReadModel/Index/Projector.php
protected function applyEventCreated(
        EventCreated $eventCreated,
        DomainMessage $domainMessage
    ) {
        $eventId = $eventCreated->getEventId();

        $location = $eventCreated->getLocation();

        $this->addNewItemToIndex(
            $domainMessage,
            $eventId,
            EntityType::EVENT(),
            $eventCreated->getTitle(),
            $location->getAddress()->getPostalCode(),
            $location->getAddress()->getLocality(),
            $location->getAddress()->getCountry()->getCode()
        );
    }
protected function applyEventCreated(
        EventCreated $eventCreated,
        DomainMessage $domainMessage
    ) {
        $eventId = $eventCreated->getEventId();

        $location = $eventCreated->getLocation();

        $this->addNewItemToIndex(
            $domainMessage,
            $eventId,
            EntityType::EVENT(),
            $eventCreated->getTitle(),
            $location->getAddress()->getPostalCode(),
            $location->getAddress()->getLocality(),
            $location->getAddress()->getCountry()->getCode()
        );
    }
protected function applyEventCreated ( EventCreated $ eventCreated , DomainMessage $ domainMessage ) { $ eventId = $ eventCreated -> getEventId ( ) ; $ location = $ eventCreated -> getLocation ( ) ; $ this -> addNewItemToIndex ( $ domainMessage , $ eventId , EntityType :: EVENT ( ) , $ eventCreated -> getTitle ( ) , $ location -> getAddress ( ) -> getPostalCode ( ) , $ location -> getAddress ( ) -> getLocality ( ) , $ location -> getAddress ( ) -> getCountry ( ) -> getCode ( ) ) ; }
Listener for event created commands.
@param EventCreated $eventCreated
@param DomainMessage $domainMessage
Listener for event created commands .