Exemplo n.º 1
0
 /**
  * @param ConnectionInterface  $connection
  * @param PoolInterface        $pool
  * @param LoggerInterface|null $log
  */
 public function __construct(ConnectionInterface $connection, PoolInterface $pool, LoggerInterface &$log = null)
 {
     $this->connection = $connection;
     $this->pool = $pool;
     $this->log = $log;
     if ($traits = $pool->getTraitNamesByType(get_class($this))) {
         foreach ($traits as $trait) {
             $trait_constructor = str_replace('\\', '', $trait);
             if (method_exists($this, $trait_constructor)) {
                 $this->{$trait_constructor}();
             }
         }
     }
     $this->configure();
 }