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

unlock() public method

Releases a lock on the given document.
public unlock ( object $document )
$document object
    public function unlock($document)
    {
        if ($this->getDocumentState($document) != self::STATE_MANAGED) {
            throw new \InvalidArgumentException("Document is not MANAGED.");
        }
        $documentName = get_class($document);
        $this->getDocumentPersister($documentName)->unlock($document);
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * Releases a lock on the given document.
  *
  * @param object $document
  */
 public function unlock($document)
 {
     if (!is_object($document)) {
         throw new \InvalidArgumentException(gettype($document));
     }
     $this->unitOfWork->unlock($document);
 }
All Usage Examples Of Doctrine\ODM\MongoDB\UnitOfWork::unlock
UnitOfWork