summaryrefslogtreecommitdiff
path: root/vendor/doctrine/dbal/src/Driver/Mysqli/Initializer/Charset.php
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2026-10-18 00:08:23 +0200
committerpolo <ordipolo@gmx.fr>2026-10-18 00:10:03 +0200
commit05e38eadbeb3de19e5b26003c2b401e00bb71df4 (patch)
treecf48350b69cfce92de6f3a0e03eb0876931c7077 /vendor/doctrine/dbal/src/Driver/Mysqli/Initializer/Charset.php
parent32843e50aa981f190bdb4fbc9adbeacc06fdf775 (diff)
downloadAppliGestionPHP-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/Driver/Mysqli/Initializer/Charset.php')
-rw-r--r--vendor/doctrine/dbal/src/Driver/Mysqli/Initializer/Charset.php32
1 files changed, 0 insertions, 32 deletions
diff --git a/vendor/doctrine/dbal/src/Driver/Mysqli/Initializer/Charset.php b/vendor/doctrine/dbal/src/Driver/Mysqli/Initializer/Charset.php
deleted file mode 100644
index d02c768..0000000
--- a/vendor/doctrine/dbal/src/Driver/Mysqli/Initializer/Charset.php
+++ /dev/null
@@ -1,32 +0,0 @@
1<?php
2
3declare(strict_types=1);
4
5namespace Doctrine\DBAL\Driver\Mysqli\Initializer;
6
7use Doctrine\DBAL\Driver\Mysqli\Exception\InvalidCharset;
8use Doctrine\DBAL\Driver\Mysqli\Initializer;
9use mysqli;
10use mysqli_sql_exception;
11
12final class Charset implements Initializer
13{
14 public function __construct(private readonly string $charset)
15 {
16 }
17
18 public function initialize(mysqli $connection): void
19 {
20 try {
21 $success = $connection->set_charset($this->charset);
22 } catch (mysqli_sql_exception $e) {
23 throw InvalidCharset::upcast($e, $this->charset);
24 }
25
26 if ($success) {
27 return;
28 }
29
30 throw InvalidCharset::fromCharset($connection, $this->charset);
31 }
32}