public function replace(UnitOfWork $unitOfWork)
    {
        if (!$this->contains($unitOfWork)) {
            throw new UnitNotPresentException;
        }

        $this->unitOfWorkStore[$unitOfWork->getUniqueId()] = $unitOfWork;
    }
public function replace(UnitOfWork $unitOfWork)
    {
        if (!$this->contains($unitOfWork)) {
            throw new UnitNotPresentException;
        }

        $this->unitOfWorkStore[$unitOfWork->getUniqueId()] = $unitOfWork;
    }
public function replace ( UnitOfWork $ unitOfWork ) { if ( ! $ this -> contains ( $ unitOfWork ) ) { throw new UnitNotPresentException ; } $ this -> unitOfWorkStore [ $ unitOfWork -> getUniqueId ( ) ] = $ unitOfWork ; }
Replaces with the given unit of work

@param UnitOfWork $unitOfWork The unit of work to replace with

@throws UnitNotPresentException

@return void
Replaces with the given unit of work