示例#1
0
 /**
  * Refreshes the persistent state of a document from the database,
  * overriding any local changes that have not yet been persisted.
  *
  * @param object $document The document to refresh.
  * @throws \InvalidArgumentException When the given $document param is not an object
  */
 public function refresh($document)
 {
     if (!is_object($document)) {
         throw new \InvalidArgumentException(gettype($document));
     }
     $this->errorIfClosed();
     $this->unitOfWork->refresh($document);
 }