vendor/symfony/doctrine-bridge/Middleware/Debug/Driver.php line 41

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the Symfony package.
  4.  *
  5.  * (c) Fabien Potencier <fabien@symfony.com>
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. namespace Symfony\Bridge\Doctrine\Middleware\Debug;
  11. use Doctrine\DBAL\Driver as DriverInterface;
  12. use Doctrine\DBAL\Driver\Middleware\AbstractDriverMiddleware;
  13. use Symfony\Component\Stopwatch\Stopwatch;
  14. /**
  15.  * @author Laurent VOULLEMIER <laurent.voullemier@gmail.com>
  16.  *
  17.  * @internal
  18.  */
  19. final class Driver extends AbstractDriverMiddleware
  20. {
  21.     private $debugDataHolder;
  22.     private $stopwatch;
  23.     private $connectionName;
  24.     public function __construct(DriverInterface $driverDebugDataHolder $debugDataHolder, ?Stopwatch $stopwatchstring $connectionName)
  25.     {
  26.         parent::__construct($driver);
  27.         $this->debugDataHolder $debugDataHolder;
  28.         $this->stopwatch $stopwatch;
  29.         $this->connectionName $connectionName;
  30.     }
  31.     public function connect(array $params): Connection
  32.     {
  33.         return new Connection(
  34.             parent::connect($params),
  35.             $this->debugDataHolder,
  36.             $this->stopwatch,
  37.             $this->connectionName
  38.         );
  39.     }
  40. }