![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/clinic.corals.io/vendor/doctrine/dbal/src/Driver/ |
<?php namespace Doctrine\DBAL\Driver; use Doctrine\DBAL\Connection; use Doctrine\DBAL\Driver\API\ExceptionConverter; use Doctrine\DBAL\Driver\API\PostgreSQL; use Doctrine\DBAL\Exception; use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Platforms\PostgreSQL100Platform; use Doctrine\DBAL\Platforms\PostgreSQL94Platform; use Doctrine\DBAL\Schema\PostgreSQLSchemaManager; use Doctrine\DBAL\VersionAwarePlatformDriver; use function preg_match; use function version_compare; /** * Abstract base implementation of the {@link Driver} interface for PostgreSQL based drivers. */ abstract class AbstractPostgreSQLDriver implements VersionAwarePlatformDriver { /** * {@inheritdoc} */ public function createDatabasePlatformForVersion($version) { if (preg_match('/^(?P<major>\d+)(?:\.(?P<minor>\d+)(?:\.(?P<patch>\d+))?)?/', $version, $versionParts) === 0) { throw Exception::invalidPlatformVersionSpecified( $version, '<major_version>.<minor_version>.<patch_version>' ); } $majorVersion = $versionParts['major']; $minorVersion = $versionParts['minor'] ?? 0; $patchVersion = $versionParts['patch'] ?? 0; $version = $majorVersion . '.' . $minorVersion . '.' . $patchVersion; if (version_compare($version, '10.0', '>=')) { return new PostgreSQL100Platform(); } return new PostgreSQL94Platform(); } /** * {@inheritdoc} */ public function getDatabasePlatform() { return new PostgreSQL94Platform(); } /** * {@inheritdoc} */ public function getSchemaManager(Connection $conn, AbstractPlatform $platform) { return new PostgreSQLSchemaManager($conn, $platform); } public function getExceptionConverter(): ExceptionConverter { return new PostgreSQL\ExceptionConverter(); } }