refresh() public method

Refreshes the state of the given document from the database, overwriting any local, unpersisted changes.
public refresh ( object $document )
$document object The document to refresh.
コード例 #1
0
ファイル: DocumentManager.php プロジェクト: noikiy/inovi
 /**
  * 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.
  */
 public function refresh($document)
 {
     if (!is_object($document)) {
         throw new \InvalidArgumentException(gettype($document));
     }
     $this->errorIfClosed();
     $this->unitOfWork->refresh($document);
 }