From 1ff5c35de5dbd70a782875a91dd2232fd01b002b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 14:38:04 +0200 Subject: Adding upstream version 0.10.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..b9a18c5 --- /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->use_ssl)) { + if (! empty($config->ssl_key)) { + $options[PDO::MYSQL_ATTR_SSL_KEY] = $config->ssl_key; + } + + if (! empty($config->ssl_cert)) { + $options[PDO::MYSQL_ATTR_SSL_CERT] = $config->ssl_cert; + } + + if (! empty($config->ssl_ca)) { + $options[PDO::MYSQL_ATTR_SSL_CA] = $config->ssl_ca; + } + + if (! empty($config->ssl_capath)) { + $options[PDO::MYSQL_ATTR_SSL_CAPATH] = $config->ssl_capath; + } + + if (! empty($config->ssl_cipher)) { + $options[PDO::MYSQL_ATTR_SSL_CIPHER] = $config->ssl_cipher; + } + + if ( + defined('PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT') + && ! empty($config->ssl_do_not_verify_server_cert) + ) { + $options[PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT] = false; + } + } + + return $options; + } +} -- cgit v1.2.3