This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Snippet for Symfony 2 application that uses Doctrine 2 to handle transactions | |
// It uses the names of the objects/doctrine repositories from the Beta 4 Manual of Symfony 2. | |
// Get the entity manager | |
$em = $this->getDoctrine()->getEntityManager(); | |
// suspend auto-commit | |
$em->getConnection()->beginTransaction(); |