From 5b6c3ee627a2845260b9f4c0effec5ff1ec2f33f Mon Sep 17 00:00:00 2001 From: ahwelp Date: Mon, 12 Jul 2021 15:58:27 -0300 Subject: [PATCH] Adding a general PDO connection creation class --- src/ORM/Connection.php | 57 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 src/ORM/Connection.php diff --git a/src/ORM/Connection.php b/src/ORM/Connection.php new file mode 100644 index 0000000..68f76b6 --- /dev/null +++ b/src/ORM/Connection.php @@ -0,0 +1,57 @@ +prefix = $prefix; + $conn->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); + return $conn; + } + +}