Doctrine\OXM\UnitOfWork::scheduleForInsert PHP Метод

scheduleForInsert() публичный Метод

If the document already has an identifier, it will be added to the identity map.
public scheduleForInsert ( object $xmlEntity )
$xmlEntity object The document to schedule for insertion.
    public function scheduleForInsert($xmlEntity)
    {
        $oid = spl_object_hash($xmlEntity);
        if (isset($this->entityUpdates[$oid])) {
            throw new \InvalidArgumentException("Dirty xml entity can not be scheduled for insertion.");
        }
        if (isset($this->entityDeletions[$oid])) {
            throw new \InvalidArgumentException("Removed xml entity can not be scheduled for insertion.");
        }
        if (isset($this->entityInsertions[$oid])) {
            throw new \InvalidArgumentException("Xml entity can not be scheduled for insertion twice.");
        }
        $this->entityInsertions[$oid] = $xmlEntity;
        if (isset($this->entityIdentifiers[$oid])) {
            $this->addToIdentityMap($xmlEntity);
        }
    }