Esempio n. 1
0
 /**
  * Sets connection and initiate it for query logging
  * @param \PropelPDO $connection
  */
 protected function setConnection(\PropelPDO $connection)
 {
     $this->connection = $connection;
     if (!$connection instanceof \DebugPDO) {
         $connection->useDebug(true);
     }
     $propelConfig = $connection->getConfiguration(\PropelConfiguration::TYPE_OBJECT);
     $propelConfig->setParameter('debugpdo.logging.details.time.enabled', true);
     $propelConfig->setParameter('debugpdo.logging.details.time.precision', 4);
     $propelConfig->setParameter('debugpdo.logging.details.mem.enabled', true);
     $propelConfig->setParameter('debugpdo.logging.details.method.enabled', true);
     $propelConfig->setParameter('debugpdo.logging.outerglue', $this->outer);
     $propelConfig->setParameter('debugpdo.logging.innerglue', $this->inner);
     $connection->setLogger($this);
 }