Exemplo n.º 1
0
 /**
  * @param Doctrine\ORM\EntityManager $em
  * @return Panel
  */
 public function bindEntityManager(Doctrine\ORM\EntityManager $em)
 {
     if ($this->em !== NULL) {
         throw new Kdyby\Doctrine\InvalidStateException("Doctrine Panel is already bound to entity manager.");
     }
     $this->em = $em;
     if ($this->em instanceof Kdyby\Doctrine\EntityManager) {
         $this->em->bindTracyPanel($this);
     }
     if ($this->connection === NULL) {
         $this->bindConnection($em->getConnection());
     }
     Debugger::getBlueScreen()->addPanel([$this, 'renderEntityManagerException']);
     return $this;
 }