Doctrine\OXM\UnitOfWork::executeUpdates PHP Method

executeUpdates() private method

Executes all xml entity updates for documents of the specified type.
private executeUpdates ( ClassMetadata $class, array $options = [] )
$class Doctrine\OXM\Mapping\ClassMetadata
$options array Array of options to be used with update()
    private function executeUpdates(ClassMetadata $class, array $options = array())
    {
        $className = $class->name;
        $persister = $this->getXmlEntityPersister($className);
        $hasPreUpdateLifecycleCallbacks = isset($class->lifecycleCallbacks[Events::preUpdate]);
        $hasPreUpdateListeners = $this->evm->hasListeners(Events::preUpdate);
        $hasPostUpdateLifecycleCallbacks = isset($class->lifecycleCallbacks[Events::postUpdate]);
        $hasPostUpdateListeners = $this->evm->hasListeners(Events::postUpdate);
        foreach ($this->entityUpdates as $oid => $xmlEntity) {
            if (get_class($xmlEntity) == $className || $xmlEntity instanceof Proxy && $xmlEntity instanceof $className) {
                //                if ( ! $class->isEmbeddedDocument) {
                if ($hasPreUpdateLifecycleCallbacks) {
                    $class->invokeLifecycleCallbacks(Events::preUpdate, $xmlEntity);
                    //                        $this->recomputeSingleDocumentChangeSet($class, $xmlEntity);
                }
                if ($hasPreUpdateListeners) {
                    $this->evm->dispatchEvent(Events::preUpdate, new Event\PreUpdateEventArgs($xmlEntity, $this->xem, $this->entityChangeSets[$oid]));
                }
                $persister->update($xmlEntity);
                unset($this->entityUpdates[$oid]);
                if ($hasPostUpdateLifecycleCallbacks) {
                    $class->invokeLifecycleCallbacks(Events::postUpdate, $xmlEntity);
                }
                if ($hasPostUpdateListeners) {
                    $this->evm->dispatchEvent(Events::postUpdate, new Event\LifecycleEventArgs($xmlEntity, $this->xem));
                }
                //                    $this->cascadePostUpdateAndPostPersist($class, $xmlEntity);
            }
        }
    }