src/Bridge/Doctrine/EventListener/PublishMercureUpdatesListener.php
public function postFlush(): void
    {
        try {
            foreach ($this->createdEntities as $entity) {
                $this->publishUpdate($entity, $this->createdEntities[$entity]);
            }

            foreach ($this->updatedEntities as $entity) {
                $this->publishUpdate($entity, $this->updatedEntities[$entity]);
            }

            foreach ($this->deletedEntities as $entity) {
                $this->publishUpdate($entity, $this->deletedEntities[$entity]);
            }
        } finally {
            $this->reset();
        }
    }
public function postFlush(): void
    {
        try {
            foreach ($this->createdEntities as $entity) {
                $this->publishUpdate($entity, $this->createdEntities[$entity]);
            }

            foreach ($this->updatedEntities as $entity) {
                $this->publishUpdate($entity, $this->updatedEntities[$entity]);
            }

            foreach ($this->deletedEntities as $entity) {
                $this->publishUpdate($entity, $this->deletedEntities[$entity]);
            }
        } finally {
            $this->reset();
        }
    }
public function postFlush ( ) : void { try { foreach ( $ this -> createdEntities as $ entity ) { $ this -> publishUpdate ( $ entity , $ this -> createdEntities [ $ entity ] ) ; } foreach ( $ this -> updatedEntities as $ entity ) { $ this -> publishUpdate ( $ entity , $ this -> updatedEntities [ $ entity ] ) ; } foreach ( $ this -> deletedEntities as $ entity ) { $ this -> publishUpdate ( $ entity , $ this -> deletedEntities [ $ entity ] ) ; } } finally { $ this -> reset ( ) ; } }
Publishes updates for changes collected on flush, and resets the store.
Publishes updates for changes collected on flush and resets the store .