diff options
| author | polo <ordipolo@gmx.fr> | 2026-10-18 00:08:23 +0200 |
|---|---|---|
| committer | polo <ordipolo@gmx.fr> | 2026-10-18 00:10:03 +0200 |
| commit | 05e38eadbeb3de19e5b26003c2b401e00bb71df4 (patch) | |
| tree | cf48350b69cfce92de6f3a0e03eb0876931c7077 /vendor/doctrine/dbal/src/Platforms/MySQL/CharsetMetadataProvider | |
| parent | 32843e50aa981f190bdb4fbc9adbeacc06fdf775 (diff) | |
| download | AppliGestionPHP-05e38eadbeb3de19e5b26003c2b401e00bb71df4.tar.gz AppliGestionPHP-05e38eadbeb3de19e5b26003c2b401e00bb71df4.tar.bz2 AppliGestionPHP-05e38eadbeb3de19e5b26003c2b401e00bb71df4.zip | |
sortie de vendor du dépôt, oubli dans config-template.ini
Diffstat (limited to 'vendor/doctrine/dbal/src/Platforms/MySQL/CharsetMetadataProvider')
2 files changed, 0 insertions, 66 deletions
diff --git a/vendor/doctrine/dbal/src/Platforms/MySQL/CharsetMetadataProvider/CachingCharsetMetadataProvider.php b/vendor/doctrine/dbal/src/Platforms/MySQL/CharsetMetadataProvider/CachingCharsetMetadataProvider.php deleted file mode 100644 index dadc841..0000000 --- a/vendor/doctrine/dbal/src/Platforms/MySQL/CharsetMetadataProvider/CachingCharsetMetadataProvider.php +++ /dev/null | |||
| @@ -1,29 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | declare(strict_types=1); | ||
| 4 | |||
| 5 | namespace Doctrine\DBAL\Platforms\MySQL\CharsetMetadataProvider; | ||
| 6 | |||
| 7 | use Doctrine\DBAL\Platforms\MySQL\CharsetMetadataProvider; | ||
| 8 | |||
| 9 | use function array_key_exists; | ||
| 10 | |||
| 11 | /** @internal */ | ||
| 12 | final class CachingCharsetMetadataProvider implements CharsetMetadataProvider | ||
| 13 | { | ||
| 14 | /** @var array<string,?string> */ | ||
| 15 | private array $cache = []; | ||
| 16 | |||
| 17 | public function __construct(private readonly CharsetMetadataProvider $charsetMetadataProvider) | ||
| 18 | { | ||
| 19 | } | ||
| 20 | |||
| 21 | public function getDefaultCharsetCollation(string $charset): ?string | ||
| 22 | { | ||
| 23 | if (array_key_exists($charset, $this->cache)) { | ||
| 24 | return $this->cache[$charset]; | ||
| 25 | } | ||
| 26 | |||
| 27 | return $this->cache[$charset] = $this->charsetMetadataProvider->getDefaultCharsetCollation($charset); | ||
| 28 | } | ||
| 29 | } | ||
diff --git a/vendor/doctrine/dbal/src/Platforms/MySQL/CharsetMetadataProvider/ConnectionCharsetMetadataProvider.php b/vendor/doctrine/dbal/src/Platforms/MySQL/CharsetMetadataProvider/ConnectionCharsetMetadataProvider.php deleted file mode 100644 index 65b63df..0000000 --- a/vendor/doctrine/dbal/src/Platforms/MySQL/CharsetMetadataProvider/ConnectionCharsetMetadataProvider.php +++ /dev/null | |||
| @@ -1,37 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | declare(strict_types=1); | ||
| 4 | |||
| 5 | namespace Doctrine\DBAL\Platforms\MySQL\CharsetMetadataProvider; | ||
| 6 | |||
| 7 | use Doctrine\DBAL\Connection; | ||
| 8 | use Doctrine\DBAL\Exception; | ||
| 9 | use Doctrine\DBAL\Platforms\MySQL\CharsetMetadataProvider; | ||
| 10 | |||
| 11 | /** @internal */ | ||
| 12 | final class ConnectionCharsetMetadataProvider implements CharsetMetadataProvider | ||
| 13 | { | ||
| 14 | public function __construct(private readonly Connection $connection) | ||
| 15 | { | ||
| 16 | } | ||
| 17 | |||
| 18 | /** @throws Exception */ | ||
| 19 | public function getDefaultCharsetCollation(string $charset): ?string | ||
| 20 | { | ||
| 21 | $collation = $this->connection->fetchOne( | ||
| 22 | <<<'SQL' | ||
| 23 | SELECT DEFAULT_COLLATE_NAME | ||
| 24 | FROM information_schema.CHARACTER_SETS | ||
| 25 | WHERE CHARACTER_SET_NAME = ?; | ||
| 26 | SQL | ||
| 27 | , | ||
| 28 | [$charset], | ||
| 29 | ); | ||
| 30 | |||
| 31 | if ($collation !== false) { | ||
| 32 | return $collation; | ||
| 33 | } | ||
| 34 | |||
| 35 | return null; | ||
| 36 | } | ||
| 37 | } | ||
