public function refresh($document)
    {
        if (!is_object($document)) {
            throw new \InvalidArgumentException(gettype($document));
        }
        $this->errorIfClosed();
        $this->unitOfWork->refresh($document);
    }
public function refresh($document)
    {
        if (!is_object($document)) {
            throw new \InvalidArgumentException(gettype($document));
        }
        $this->errorIfClosed();
        $this->unitOfWork->refresh($document);
    }
public function refresh ( $ document ) { if ( ! is_object ( $ document ) ) { throw new \ InvalidArgumentException ( gettype ( $ document ) ) ; } $ this -> errorIfClosed ( ) ; $ this -> unitOfWork -> refresh ( $ document ) ; }
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
Refreshes the persistent state of a document from the database overriding any local changes that have not yet been persisted .