Doctrine\ODM\MongoDB\UnitOfWork::scheduleForDirtyCheck PHP Method

scheduleForDirtyCheck() public method

Schedules a document for dirty-checking at commit-time.
public scheduleForDirtyCheck ( object $document )
$document object The document to schedule for dirty-checking.
    public function scheduleForDirtyCheck($document)
    {
        $class = $this->dm->getClassMetadata(get_class($document));
        $this->scheduledForDirtyCheck[$class->name][spl_object_hash($document)] = $document;
    }

Usage Example

 /**
  * Marks this collection as changed/dirty.
  */
 private function changed()
 {
     if ($this->isDirty) {
         return;
     }
     $this->isDirty = true;
     if ($this->needsSchedulingForDirtyCheck()) {
         $this->uow->scheduleForDirtyCheck($this->owner);
     }
 }
All Usage Examples Of Doctrine\ODM\MongoDB\UnitOfWork::scheduleForDirtyCheck
UnitOfWork