public function scheduleForUpdate($document)
    {
        $oid = spl_object_hash($document);
        if ( ! isset($this->documentIdentifiers[$oid])) {
            throw new \InvalidArgumentException("Document has no identity.");
        }
        if (isset($this->documentDeletions[$oid])) {
            throw new \InvalidArgumentException("Document is removed.");
        }

        if ( ! isset($this->documentUpdates[$oid]) && ! isset($this->documentInsertions[$oid]) && ! isset($this->documentUpserts[$oid])) {
            $this->documentUpdates[$oid] = $document;
        }
    }
public function scheduleForUpdate($document)
    {
        $oid = spl_object_hash($document);
        if ( ! isset($this->documentIdentifiers[$oid])) {
            throw new \InvalidArgumentException("Document has no identity.");
        }
        if (isset($this->documentDeletions[$oid])) {
            throw new \InvalidArgumentException("Document is removed.");
        }

        if ( ! isset($this->documentUpdates[$oid]) && ! isset($this->documentInsertions[$oid]) && ! isset($this->documentUpserts[$oid])) {
            $this->documentUpdates[$oid] = $document;
        }
    }
public function scheduleForUpdate ( $ document ) { $ oid = spl_object_hash ( $ document ) ; if ( ! isset ( $ this -> documentIdentifiers [ $ oid ] ) ) { throw new \ InvalidArgumentException ( "Document has no identity." ) ; } if ( isset ( $ this -> documentDeletions [ $ oid ] ) ) { throw new \ InvalidArgumentException ( "Document is removed." ) ; } if ( ! isset ( $ this -> documentUpdates [ $ oid ] ) && ! isset ( $ this -> documentInsertions [ $ oid ] ) && ! isset ( $ this -> documentUpserts [ $ oid ] ) ) { $ this -> documentUpdates [ $ oid ] = $ document ; } }
Schedules a document for being updated.

@param object $document The document to schedule for being updated.
@throws \InvalidArgumentException
Schedules a document for being updated .