recomputeSingleDocumentChangeSet() public method

The passed document must be a managed document. If the document already has a change set because this method is invoked during a commit cycle then the change sets are added. whereby changes detected in this method prevail.
public recomputeSingleDocumentChangeSet ( ClassMetadata $class, object $document )
$class Doctrine\ODM\MongoDB\Mapping\ClassMetadata The class descriptor of the document.
$document object The document for which to (re)calculate the change set.
コード例 #1
0
 /**
  * Invokes preUpdate callbacks and events for given document cascading them to embedded documents as well.
  *
  * @param ClassMetadata $class
  * @param object $document
  */
 public function preUpdate(ClassMetadata $class, $document)
 {
     if (!empty($class->lifecycleCallbacks[Events::preUpdate])) {
         $class->invokeLifecycleCallbacks(Events::preUpdate, $document, array(new PreUpdateEventArgs($document, $this->dm, $this->uow->getDocumentChangeSet($document))));
         $this->uow->recomputeSingleDocumentChangeSet($class, $document);
     }
     $this->evm->dispatchEvent(Events::preUpdate, new PreUpdateEventArgs($document, $this->dm, $this->uow->getDocumentChangeSet($document)));
     $this->cascadePreUpdate($class, $document);
 }
コード例 #2
0
ファイル: ODM.php プロジェクト: nahakiole/cloudrexx
 /**
  * Recompute the single object changeset from a UnitOfWork
  *
  * @param UnitOfWork $uow
  * @param ClassMetadataInfo $meta
  * @param Object $object
  * @return void
  */
 public function recomputeSingleObjectChangeSet(UnitOfWork $uow, ClassMetadataInfo $meta, $object)
 {
     $uow->recomputeSingleDocumentChangeSet($meta, $object);
 }