We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 926e1f1 + e550bd5 commit efb1538Copy full SHA for efb1538
src/FakePdo.php
@@ -0,0 +1,27 @@
1
+<?php
2
+namespace Vimeo\MysqlEngine;
3
+
4
+use PDO;
5
6
+class FakePdo
7
+{
8
+ /**
9
+ * @param string $connection_string the connection string
10
+ * @param string $username the username
11
+ * @param string $password the password
12
+ * @param array<array-key, string> $options any options
13
+ * @return PDO
14
+ */
15
+ public static function getFakePdo(
16
+ string $connection_string,
17
+ string $username,
18
+ string $password,
19
+ array $options
20
+ ): PDO {
21
+ if (\PHP_MAJOR_VERSION === 8) {
22
+ return new Php8\FakePdo($connection_string, $username, $password, $options);
23
+ }
24
25
+ return new Php7\FakePdo($connection_string, $username, $password, $options);
26
27
+}
0 commit comments