public static function getConn() { try { if (!self::$conn) { self::$conn = new PDO('mysql:dbname=' . self::DB_NAME . ';host=' . self::DB_HOST . ';', self::DB_USER, self::DB_PASS); } } catch (PDOException $e) { echo "An error occured: " . $e->getMessage(); } return self::$conn; }