Doctrine/Bridge.php
public function setEntityManager(EntityManager $em)
    {
        if ($this->em !== null) {
            throw new \LogicException('Entity manager can only be set before any results are fetched');
        }

        $this->em = $em;
    }
public function setEntityManager(EntityManager $em)
    {
        if ($this->em !== null) {
            throw new \LogicException('Entity manager can only be set before any results are fetched');
        }

        $this->em = $em;
    }
public function setEntityManager ( EntityManager $ em ) { if ( $ this -> em !== null ) { throw new \ LogicException ( 'Entity manager can only be set before any results are fetched' ) ; } $ this -> em = $ em ; }
Set an EntityManager

@param EntityManager $em

@throws LogicException If entity manager already set
Set an EntityManager