![]() 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/mautic.corals.io/app/bundles/CoreBundle/Doctrine/ |
<?php declare(strict_types=1); namespace Mautic\CoreBundle\Doctrine; use Doctrine\DBAL\Platforms\AbstractMySQLPlatform; use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Platforms\DB2Platform; use Doctrine\DBAL\Platforms\OraclePlatform; use Doctrine\DBAL\Platforms\PostgreSQLPlatform; use Doctrine\DBAL\Platforms\SqlitePlatform; use Doctrine\DBAL\Platforms\SQLServerPlatform; /** * A workaround for deprecated \Doctrine\DBAL\Platforms\AbstractPlatform::getName. */ class DatabasePlatform { public static function getDatabasePlatform(AbstractPlatform $platform): string { if ($platform instanceof AbstractMySQLPlatform) { return 'mysql'; } if ($platform instanceof DB2Platform) { return 'db2'; } if ($platform instanceof OraclePlatform) { return 'oracle'; } if ($platform instanceof PostgreSQLPlatform) { return 'postgresql'; } if ($platform instanceof SQLServerPlatform) { return 'mssql'; } if ($platform instanceof SqlitePlatform) { return 'sqlite'; } throw new \RuntimeException('Unknown platform '.$platform::class); } }