vendor/doctrine/dbal/src/Driver/Middleware/AbstractDriverMiddleware.php line 34

Open in your IDE?
  1. <?php
  2. namespace Doctrine\DBAL\Driver\Middleware;
  3. use Doctrine\DBAL\Connection;
  4. use Doctrine\DBAL\Driver;
  5. use Doctrine\DBAL\Driver\API\ExceptionConverter;
  6. use Doctrine\DBAL\Platforms\AbstractPlatform;
  7. use Doctrine\DBAL\VersionAwarePlatformDriver;
  8. abstract class AbstractDriverMiddleware implements VersionAwarePlatformDriver
  9. {
  10.     /** @var Driver */
  11.     private $wrappedDriver;
  12.     public function __construct(Driver $wrappedDriver)
  13.     {
  14.         $this->wrappedDriver $wrappedDriver;
  15.     }
  16.     /**
  17.      * {@inheritdoc}
  18.      */
  19.     public function connect(array $params)
  20.     {
  21.         return $this->wrappedDriver->connect($params);
  22.     }
  23.     /**
  24.      * {@inheritdoc}
  25.      */
  26.     public function getDatabasePlatform()
  27.     {
  28.         return $this->wrappedDriver->getDatabasePlatform();
  29.     }
  30.     /**
  31.      * {@inheritdoc}
  32.      */
  33.     public function getSchemaManager(Connection $connAbstractPlatform $platform)
  34.     {
  35.         return $this->wrappedDriver->getSchemaManager($conn$platform);
  36.     }
  37.     public function getExceptionConverter(): ExceptionConverter
  38.     {
  39.         return $this->wrappedDriver->getExceptionConverter();
  40.     }
  41.     /**
  42.      * {@inheritdoc}
  43.      */
  44.     public function createDatabasePlatformForVersion($version)
  45.     {
  46.         if ($this->wrappedDriver instanceof VersionAwarePlatformDriver) {
  47.             return $this->wrappedDriver->createDatabasePlatformForVersion($version);
  48.         }
  49.         return $this->wrappedDriver->getDatabasePlatform();
  50.     }
  51. }