Doctrine\ORM\UnitOfWork::__construct PHP Method

__construct() public method

Initializes a new UnitOfWork instance, bound to the given EntityManager.
public __construct ( EntityManager $em )
$em EntityManager
    public function __construct(EntityManager $em)
    {
        $this->em = $em;
        $this->evm = $em->getEventManager();
    }