From 4ce65d59ca91871cfd126497158200a818720bce Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 13:30:08 +0200 Subject: Adding upstream version 0.13.1. Signed-off-by: Daniel Baumann --- vendor/ipl/sql/src/Adapter/Mysql.php | 57 ++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 vendor/ipl/sql/src/Adapter/Mysql.php (limited to 'vendor/ipl/sql/src/Adapter/Mysql.php') diff --git a/vendor/ipl/sql/src/Adapter/Mysql.php b/vendor/ipl/sql/src/Adapter/Mysql.php new file mode 100644 index 0000000..2421cae --- /dev/null +++ b/vendor/ipl/sql/src/Adapter/Mysql.php @@ -0,0 +1,57 @@ +exec('SET time_zone = ' . $db->quote($this->getTimezoneOffset())); + + return $this; + } + + public function getOptions(Config $config) + { + $options = parent::getOptions($config); + + if (! empty($config->useSsl)) { + if (! empty($config->sslKey)) { + $options[PDO::MYSQL_ATTR_SSL_KEY] = $config->sslKey; + } + + if (! empty($config->sslCert)) { + $options[PDO::MYSQL_ATTR_SSL_CERT] = $config->sslCert; + } + + if (! empty($config->sslCa)) { + $options[PDO::MYSQL_ATTR_SSL_CA] = $config->sslCa; + } + + if (! empty($config->sslCapath)) { + $options[PDO::MYSQL_ATTR_SSL_CAPATH] = $config->sslCapath; + } + + if (! empty($config->sslCipher)) { + $options[PDO::MYSQL_ATTR_SSL_CIPHER] = $config->sslCipher; + } + + if ( + defined('PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT') + && ! empty($config->sslDoNotVerifyServerCert) + ) { + $options[PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT] = false; + } + } + + return $options; + } +} -- cgit v1.2.3