original_string: public function setEntityManager(EntityManager $entityManager)
  	{
  		$this->entityManager = $entityManager;
  		$this->connection = $entityManager->getConnection();
  		$bar = Debugger::getBar();
  		$bar->addPanel($this);
  
  		$config = $this->connection->getConfiguration();
  		$logger = $config->getSQLLogger();
  
  		if ($logger instanceof Doctrine\DBAL\Logging\LoggerChain) {
  			$logger->addLogger($this);
  		} else {
  			$config->setSQLLogger($this);
  		}
  	}
code: public function setEntityManager(EntityManager $entityManager)
  	{
  		$this->entityManager = $entityManager;
  		$this->connection = $entityManager->getConnection();
  		$bar = Debugger::getBar();
  		$bar->addPanel($this);
  
  		$config = $this->connection->getConfiguration();
  		$logger = $config->getSQLLogger();
  
  		if ($logger instanceof Doctrine\DBAL\Logging\LoggerChain) {
  			$logger->addLogger($this);
  		} else {
  			$config->setSQLLogger($this);
  		}
  	}
code_tokens: public function setEntityManager ( EntityManager $ entityManager ) { $ this -> entityManager = $ entityManager ; $ this -> connection = $ entityManager -> getConnection ( ) ; $ bar = Debugger :: getBar ( ) ; $ bar -> addPanel ( $ this ) ; $ config = $ this -> connection -> getConfiguration ( ) ; $ logger = $ config -> getSQLLogger ( ) ; if ( $ logger instanceof Doctrine \ DBAL \ Logging \ LoggerChain ) { $ logger -> addLogger ( $ this ) ; } else { $ config -> setSQLLogger ( $ this ) ; } }
docstring: Sets entity manager.
  
  @param EntityManager $entityManager The Doctrine Entity Manager
docstring_tokens: Sets entity manager .